The basic principle is to create an XML file in the drawable directory to describe the background image. The content is as follows:
">
16
Then specify
Android: progressdrawable attribute. The attribute value is the XML file just
Build an android Development Environment (android4.0.3)
1. First download the relevant software
1). JDK 6 or above
2). Eclipse (version 3.6.2 or higher) Click to download
3). The SDK (android-sdk_r18-windows) is currently the latestClick to
The first research here is how to obtain the package name and main activity name of all applications in the Android mobile phone.
// Obtain the package name of all applicationsIntent intent = new intent (intent. action_main, null );Intent.
Today is the first day to officially start learning Android. A month ago, after setting up the environment and running Hello world, I never paid much attention to it. I chose the book "android SDK development example book 2". Today I will introduce
During project development over the past few days, if you want to read the content in a text file, write a method to read the content in the text file. The Code is as follows:
// Read the content of a text filePublic static string readtxtfile
The following is a method for writing text files in Android development. The Code is as follows:
// Write the string to a text filePublic static void writetxtfile (string strcontent, string strfilepath){// Line feed is written each time it is
Previously, the option menu was described in details in "android menu details (II) -- create and respond to option Menus" and "android menu details (iii) -- submenu and iconmenu, sub-menu and Icon menu. Next, let's talk about another widely used
Starting from Android 2.3 Gingerbread, native supports front cameras. Next we will look at how to call the front camera in the program.
The first method is to use mediastore to call the system's native camera.
Intent intent = new intent
Generally, shortcuts are not automatically created after the android application is installed. Therefore, you can implement shortcuts when the application is started.
Permission required
The attribute of the activity corresponding to the shortcut
Android multi-touch is essentially supported by LCD drivers and programming. Currently, mobile phones that use capacitive screen touch can support multi-touch multitouch technology, provides a better user experience for webpage scaling and gesture
Twolinelistitem inherits Android. widget. relativelayout. It is composed of two subviews and is usually used in listview.
It requires two textviews (the id value is text1 and text2), and an optional third view (the id value is selectedicon)
There are three common tools for parsing XML on the Android platform: Dom, sax, and pull.
First, Dom,
It features full loading at a time. If the data size is small, it is still efficient. If the XML file is large, the speed will be slow.
Method 2:
In the following example, we will experiment with all the content mentioned above. In this example, an activity contains two fragment items. One shows the playing tracks of Shakespeare's plays, and the other shows the abstract of the selected tracks.
Shortcut Key
To speed up operations on the option menu, you can add shortcut keys to the menu on devices with physical buttons. Shortcut Keys can correspond to letters or numbers on the keyboard. What you need to do isAttribute specified by
Create an option menu
The option menu should contain basic activity actions and required navigation entries (for example, a menu item set to open the program ). option menu items have two different options: one is the menu item button, and the other
In Android, the position of popupwindow is usually determined by the showasdropdown function. This function has two overload functions, which are defined as follows:
Public void showasdropdown (view anchor) { showasdropdown (anchor, 0, 0); }
I. Preparations 1. Download The msysgit Tool Git client program in windows,: http://code.google.com/p/msysgit/See:2. Install the msysgit Tool See: 3. Create a folder on the disk To store the android source code downloaded by the GIT tool, see: 4.
After you click "Restore factory settings", the system restarts and enters the system again. All data is cleared. How can you determine whether to restore the factory settings? How can I mark the restore factory settings event? After the system is
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