Android interview Summary 1
1 handler message loop messageQueue
Processing
2 fragment Lifecycle
3 ContentProvider
4 WebView
5 BroadCastreciver Broadcast
6. Obtain ContentProvider ContentReciver from the address book
Obtains the user's profile picture and mobile phone number.
7. Incorrect ListVIew Image
Think about it:
GetView () Check the source code
8 ListView optimization:
Reuse of convertview
9 service
Methods:
First
StartService ()
Second
BindService ()
10 AsyncTask () asynchronous task
Common Methods
DoinBackground () processing sub-Thread
OnUpdateExcute ()
OnPostExcute ()
For example:
Private class DownloadFilesTask extends AsyncTask {
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 ");
}
}
11 Volley
12 XUtils
13 HttpClient
Get Post
14 Json Parsing Method
Which of the following types are available:
Org. json
Gson
FastJson
15 XML Parsing Method
Dom Tree
SAX
Pull
16 Intent Methods
17 Activity Lifecycle
18 ShareReferrence
19 what is Base64?
It is used for transmission. After a file is converted into a string and received as a string, it can be converted into a corresponding file;
20 encryption method:
Encryption Method:
1.apk mixed code, apk signature Packaging
2. Add Permissions
21 serizaable serializable
To facilitate object transmission, This is
Android introduces Priczabble
22 XMPP
23. Custom View
Bar Chart
Pie Chart
24 JPush
25 determine the network connection
ConnectivityManager gets its type to determine whether it is connected to the network.
26. Audio
27 videos
28 VIewPager
Sliding ViewGroup
29. Image Cache
1. First in soft reference, if there is, there is no image retrieved from the SD card, or if it does not exist, it will be downloaded from the network;
Soft reference: The system does not recycle resources because resources are not too tight;
30 Viewpager and horzitalScrollView
31 layout_gri.pdf position of the current sub-space relative to the parent Control
Grimace's internal content
32 layout_weight weight
Divide the remaining controls equally.
33. SQL database
Supported types:
34 event distribution mechanism
View ondisPathTouchenvent ();
OnInnerTouch ();
OnTouchEvent ();
35 international principles
36. Internationalization principles
When the mobile phone starts, it detects the language of the mobile phone,
Load the xml file at the end of en. If not,
The default xml file is automatically loaded.
37 Baidu Map
38 Java internationalization?
Local Localization
Property File
1. Since you have performed audio, the interaction between audio streams and Android
2. Video and audio Synchronization
3. the display effect at the bottom of the pull-down header of ListView is the parameter meaning of onlayout. The parameter meaning of the adapter getView includes the refresh mechanism of the refresh View. The refresh methods of the View are different (invalidate, postInvalidate) paging method of ListView
View: refresh method, inValidate, and postInvalidate (called in the thread, the UI is refreshed)
4. Since there is a static instance object in the Singleton, is the static class not directly used for Mao? Is static variables resident in memory? Will GC be destroyed? Multi-threaded access to the single instance security issues.
Static class: no new object is required. The attributes and methods in the static class are static.
Non-static class: a New object is required, and the attributes and methods in the object are not necessarily static classes;
It is resident, Gc will not destroy it, multi-thread access Singleton mode, remember to synchronize the methods for obtaining this instance;
5. Who is in the main thread of the four major components. Why use intentService in actual projects.
IntentService: Used in asynchronous threads. It can be used for downloading and will automatically stop the service.
All four components work in the main thread, and IntenService
6. Observer mode derived from broadcast and the design mode learned in android SDK
7. Which functions will you use for custom View, such as the functions in which the custom listView operates to achieve the desired display effect?
The constructor will certainly have some options. After loading the listview you want, you can modify the display effect by modifying the listView adapter;
8. switching between the portrait and landscape screens is another method for saving data except onSaveInstanceState.
Method 1: database and SharePrefenrce;
9. the SDK design mode involves
10. Description of the postDelayed functions of runOnUiThread and view
RunOnUiThread is converted to the main thread, and postDelayed is the time to update the UI, which is actually implemented by handler;
11. Linear layout assumes that there are three horizontal buttons, how to leave them blank in the middle of the arrangement on both sides, and when the gravity attribute will expire.
12. How to Set margin for the relatively layout control in the code
Android: layout_marginLeft = "20dp"
13. asynchronous loading of images,
1. Send an HTtp request to download the image. After the download is complete, the Handler notifies the UI to update the image;
14. Will useless objects be recycled in time after garbage collection is called?
15. What classes are commonly used in V4 packages and how to use them?
16. Use and lifecycle of Fragment
OnCreate onCreateView onPause onStop onDestroyView onDestroy
17. Use of dialogfragment
18. Whether or not to write margin directly into layout that includes include takes effect, and why
19. What is logoff?
Obtains messages from MessageQueue in order;
20. I have read some classes of code in open-source projects or sdks.