Android vigorous to get started, write a dialer first.

Source: Internet
Author: User

Instead of starting with a systematic specialization in four major components, start the application immediately and initially plan to refresh all the common software on your phone.

I often play on the phone, there are some more lol boxes, official assistants, video apps and other tools. Since the beginning of the 2011, the most first in the rise of the students in the Android smart machine, 999 Bucks bought a Huawei U8500. At that time, the students are still using Nokia! That picture of yo, thief clear, and I just want to mass fetion, SMS fee can not afford, I have to act as a monitor of the role every day. I also recorded a few years of good times in my college with Nokia's Super pixel. Since then, with the start of Android, then all the way to witness a variety of rogue apps on my mobile phone to fight the killing of text messages, contacts, call records, chat records, Internet records, not timed to give me some yellow jokes, in the jackpot, 46-grade warranty, such as a variety of high-tech information. The heart of this reading: Big data, in fact, are rogue, including reptiles, the latter have time to focus on a mention. Of course, I seem to stand in the commanding heights of morality, follow a programmer should be good quality, but the face of all kinds of strange bosses, this kind of thing should be careful to do, after all, in order to live, not survival.

It is decided that the development of Android will begin, where to use what knowledge to explore.

While writing a blog, do it by yourself:

Dialer, give me the idea is should be designed to this: Of course, and the normal than the point, but I rarely use * and #, here is not added, mainly to achieve the call function. Green is the call record, phone number is completely I made up, the situation of harassment, please contact me to play mosaic.

Finally, after my transformation, it became this way:

It actually took a lot of effort to get him out of the way, which is not so much the same as swing and AWT in Java.

Phone number input box: EditText

Please enter a phone number (click to automatically disappear): Here I use the EDITTEXT hint property

Four call logs: actually four button

Style: All buttons used in style= "? Android:attr/borderlessbuttonstyle" all use this property, so it doesn't look like a button

1234567890 Call Delete and so on are button, but these buttons are not lined up so I'm busy, the activity used a linear layout, nested table layout, but the table layout is not column operation, may have, but I did not find, so write four lines, Found all squeezed into the upper left corner of the interface. This question is still thinking for a long time, with another similar problem, the button on the text is all in the upper left corner, this I think the location should have a method, sure enough Google to this:android:gravity= "Left|center"

Left|center is left in the middle, left is the right side, suddenly, so, similar to the table design, but the table is still compact heap in the left side of the interface section. Really no way, I put the length of the button to write dead, three buttons just fill the whole line, so the arrangement down is more beautiful. In this way, can only match my millet 2S, other models of rendering is more wonderful. Search for information when you see a custom keyboard, but look at the feeling that my way out is relatively large, I was written dead on the interface, they are from the bottom of the pop out. I just want to know how to manipulate the table layout horizontally. Custom keyboards have time to expand later.

The function is still to be perfected, I just wrote a layout that looks like a little bit.

followed by a variety of button monitoring, listen to the click Operation, the EditText added a value, here began only think of the SetText method, so wrote a lot of trouble, click event Trigger, EditText first GetText, and then perform string concatenation, Continue to assign value SetText, then suddenly remembered to stringbuffer the append, delete the implementation of the function with this character channeling Shear str.substring (0,str.length ()-1);

The following is the value of the beginning of the call, the side of the expansion to the intent, which actually gradually began to contact other components, call the call function, but to get permission, registered a bit, so that the software is done, and other functions like call records, read phone book, etc., I have not done.

But the implementation of the call function after the discovery or jump to the system comes with the call interface, this I have not thought how to deal with, should be the bottom of the operation of the hardware and communications, such as the function, think of, don't look at the first.

The entire production process is actually better than the paste code is much better, after finished I feel, just understand how to invoke the system function, even if all the functions can be realized quickly, I think, my road is very long.

Android Studio will be used in the future, and today I see Google no longer supports eclipse. and compile source code is I will encounter sooner or later, so the previous blog set up Ubuntu still has a little effect. Slowly porting to Ubuntu has been developed with studio.

In addition, in the home and the company two computers are configured with the development environment, but to write a good project test to go still too much trouble. In fact, long before the registration of Git, but not how to use, have been looking at other people's code, I think, blog tags should be added a group: Git

Project all the source code, the post to the blog will paste, the whole project will be uploaded to git open source, I hope you can guide.

The more you learn, the less you will find.

Android vigorous to get started, write a dialer first.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.