Android-developed Phone Dialer

Source: Internet
Author: User

1. The layout file code is as follows:

During the implementation, EditText warns that the text field does not specify an inputtype or a hint because the EditText control needs to define the InputType property and its properties can be found on the web itself, Android:inputtype= "Number|phone" means the input is a number or a number, and a warning unexpected text found in layout file: "". And then I looked in the layout files carefully for the extra "" "I didn't find it. , and finally ctrl+shift+f the layout file, you can see the superfluous "". Delete.

The 2.Java code is as follows: The intent table class, which is the medium for Android development, is used here to pass data between two activity. The Android system itself dials the activity corresponding to the androidmainfest.xml in the following declarations some properties are as follows: so we need to call the Android system itself to dial activity must be maintained in some of the properties of the same, so filter filtering before the horse    Find the corresponding activity and call start. Note: When we need to start an exception activity in the program, we often use implicit invocation, that is, we do not directly specify the activity to jump, but instead provide some relevant parameters for intent. Let it automatically match the activity already in the Androidmanifest.xml (StartActivity () method is used here to implement the matching process), and Intentfilter (Intent filter) There are three main parameters in XML: Action,categary,data. For implicitly called Intent,android the default is to add a category_default, so if intent If the category is not Android.intent.category.DEFAULT in filter, the match test will fail. So, if your activity supports receiving implicit intent, be sure to include Android.intent.category.DEFAULT in intent filter.

Exceptions are: Android.intent.category.MAIN and Android.intent.category.LAUNCHER do not need to join the Android.intent.category.DEFAULT in the filter, of course, not to ask Problem.

3. When writing permissions in Androidmainfest.xml <uses-permission> tag appears after <application> this warning message because the permission is not placed in the < Before application>. The reason to write permissions is that you need to get this permission on your phone when you install the app to your phone, and only write this permission in the app to install it smoothly on your phone. This warning appears warining: "Not targeting the latest version of android;compatibility modest apply.consider testing and updating this Version.consult the Android.os.Build ... is to remind us that there is no match using the latest SDK version, which may cause the app to be unable to take advantage of the latest features or functionality on the latest system, the way to get rid of this warning is to put the USES-SDK tag in android: Targetsdkversion property to the latest SDK version on your computer, such as the latest SDK on my computer is android4.4, its version number is 19, then I should write "android:targetsdkversion=" 19 ", This will not be an error.
Last two virtual machine call effects:

Android-developed Phone Dialer

Related Article

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: 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.