Android---------------Basics

Source: Internet
Author: User

1 handler message loop MessageQueue
Processing


2 Fragment life cycle


3 ContentProvider


4 WebView


5 Broadcastreciver Broadcast


6 getting ContentProvider Contentreciver of contacts
Get the user's avatar, phone number, etc.


7 The malposition of the ListVIew picture
Think about it for a moment:
GetView () Look at the source code




8 ListView Optimization:
Reuse of Convertview View




9 Service
Several ways:
First Kind
StartService ()
The second Kind
Bindservice ()


Ten Asynctask () asynchronous tasks
Common methods
Doinbackground () Processing child threads
Onupdateexcute ()
Onpostexcute ()


For example:
Private class Downloadfilestask extends Asynctask<url, Integer, long> {
Protected Long doinbackground (URL ... urls) {
int count = Urls.length;
Long totalsize = 0;
for (int i = 0; i < count; i++) {
TotalSize + = Downloader.downloadfile (Urls[i]);
Publishprogress ((int) ((I/(float) count) * 100));
Escape early if Cancel () is called
if (iscancelled ()) break;
}
return totalsize;
}


protected void Onprogressupdate (Integer ... progress) {
Setprogresspercent (Progress[0]);
}


protected void OnPostExecute (Long result) {
ShowDialog ("downloaded" + result + "bytes");
}
}


Volley


Xutils


HttpClient
Get Post


Json Parsing method
What are the types of:
Org.json
Gson
Fastjson


XML Parsing method
Dom Tree
Sax
Pull


Intent several ways


Activity life cycle


Sharereferrence


What is Base64?


20 Ways to encrypt: you know.


Serizaable serializable


XMPP


23 Customizing view
Bar chart
Pie chart


Jpush push


25 Determining the network connection


26 Audio


27 Video


Viewpager


29 Cache of Images
Two-time sampling


Viewpager and Horzitalscrollview


Layout_grivity The position of the current child space relative to the parent control

Grivity Own internal content


Layout_weight weight
Divide the remaining controls evenly.


SQL database
Type of support:


34 Event Distribution mechanism


35 International Principles

36 Principles of Internationalization
When the phone starts, it detects the language of the phone,
Go back and load the XML file at the end of En. If not,
The default XML file is automatically loaded.


3,700 degree Map


Internationalization of Java?
Local localization
Properties file











Android---------------Basics

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.