Div id= ' preview-contents ' class= ' note-content ' > android30-fragment-Understanding
规范
Mobilesafe V2.0
- Welcome page
- Whether the user needs a user prompt for the first time
- How data from the news app is acquired
- Do you know the question? How to maximize the resources around you
The second is to take advantage of the SDK's own UI performance detection Tool HierarchyViewer .
Welcome Page Clear Title
Define the topic yourself Activity , or use the system'srequestWindowFeature(Window.FEATURE_NO_TITLE);
Problem stackFragmentDynamic implementation method, a good understanding of the principle of fragmentation,
It is actually an object that gets to the transaction through the Shard manager FragmentManager FragmentTransaction and Fragment commits us to the Activity corresponding position where we created the layout to be difficult.
Fragment Inter-communication getActivity() can be obtained to the associated Activity so that the corresponding control can be set up.
Life cycle
onAttach方法: Fragment Activity Called when the Association is established.
onCreateViewMethod: Fragment Called when the layout is loaded.
onActivityCreatedMethod: Activity Called when the method in the hold onCreate -line is finished.
onDestroyViewMethod: ragment Called when the layout in F is removed.
onDetachMethod: Fragmen called when T is associated with activity ' disassociate.
-
Querying all animations for the use of parameters
-
ViewPageAdapter Implementation principle
-
The Google Open source framework uses
New acquisition
Thread() and Thread(new Runnable) the difference?
By looking at the source code, you can see that the Thread class is actually a Runnable real column of the interface, so the method inside the thread is to invoke the method in the run() interface's Runnable real column, run and the Start() JVM thread method will begin to be called run() .
Threadin the source code as follows, tatget is actually an Runable implementation
publicvoid run() {
if (targetnull) {
target.run();
}
}
So the use of the construction method when used Thread(new Runable) is actually passed Runnable to the tatget efficiency now I don't quite understand
Experience
- Good frame design in advance, easy to expand after implementation
- Quickly put the phone defender code finish transcription can also. It's good to be familiar with the teacher and listen to the questions.
android30-fragment-Understanding