When using listview (SDK 2.3.3) Today, I want to use addheaderview to add a similarIn the view of the header.
Check the API documentation and find that this interface must be called before setadapter.Added a header.
However, a strange problem was
Android disables System sleep, keeps the screen hidden, and keeps the screen highlighted in the game.
There are two ways to implement this function. One is to declare in the manifest. xml file, and the other isCodeModify the flag of layoutparams.
Check the network in Wifi-3G-2G order before establishing a connection
Do not maintain 2g/3G connections
Push is recommended when WiFi is available. Do not use timed query.
Optimize applicationsProgramDesign andAlgorithm
Use simple and
Android has two classesAndroid. View. gesturedetectorAndroid. View. gesturedetector. simpleongesturelistener
1) create a class that inherits the simpleongesturelistener and hahagesturedetectorlistener class to implement the following Event
FileHttp://download.csdn.net/source/2039608For more information, see the documentation.
PortGoogle Apps (market; Gtalk; Google Maps; Gmail; Voice Search)The procedure is as follows:
1.PassADB, FromGoogleDownload related files on a custom mobile
Android bootanimation production process:
Android boot Animation: A bootanimation.zip,Put bootanimation.zip in/System/media directory.Bootanimation format:Bootanimation.zip It contains the Part1 Part2 folder and desc.txt
User1 @ user1-desktop :~
Public class hellowebview extends activity {webview mwebview;/** called when the activity is first created. * // @ override public void oncreate (bundle savedinstancestate) {super. oncreate (savedinstancestate); setcontentview (R. layout. main);
In androidmanifest. XML, the element can be used as a child element and is contained in , , , and elements,Different parent elements have different reading methods in the application.
1: Application in activity. XML code segment:
Android supports modular compilation and can compile a module, such as a browser.
1. Go to the android source code root directory and execute source build/envsetup. Sh;
2. You can execute compilation commands for mm, mmm, and other modules. To
Gridview:1. Display resource content in a grid2. Use the numcolumns attribute to list Columns
Tab:1. The tabactivity class to be written must inherit tabactivity. It is already an activity and does not need to be rendered again;2. Get the tabhost
Storage Methods: sharedpreferences, SQLite, file storage, and network storageSharedpreferences:The NVP (key-Value Pair) method is used to store data in the android file system. data can be shared between different applications.Supported modes:
1. http://blog.csdn.net/omg_2012/article/details/7881443
This article is quite good.
2. http://blog.csdn.net/android_tutor/article/details/7193090
3. http://blog.csdn.net/heng615975867/article/details/8791937
4. http://www.dewen.org/q/2438/
When
Ratingbar:
1. If layout_width of ratingbar is "fill_parent", the asterisk will overscreen
2. getrating ()/setrating (float)
Imageview:
1. Use setimageresources (INT imageid)
Imagebutton:
1. Create an XML file in the drawable-mdpi folder, specify
Manifest. xmlThe package attribute in the label is used to set the process name of the application, that is, the process name viewed by ddms during running.The label is used to set the application source package name, that is, the source code
Broadcastreceiver:A globally unique identifier must be used to construct intent.Call sendbroadcast (intent) to send BroadcastTo create a broadcastreceiver object, you must inherit the broadcastreceiver class,Override the onreceive () method to call
Address: http://developer.android.com/guide/topics/fundamentals.htmlNote: The translation is incomplete and you can choose to read it.
Application Basics
Android is written in Java. All Java code and related resource files are packaged into an
Http://mobile.51cto.com/abased-375025.htmhttp://blog.sina.com.cn/s/blog_7db304660100xgpp.html
Android/data: This is the cache path of the application. If you clear the cache of the application in the settings, the data in this directory will also
How Android draws a viewWhen an activity receives the focus, it is required to draw the interface layout. The android framework will process the painting process, but the activity must provide the root node of the layout layer.
The painting starts
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