Modify android4.4 Image Library Series 5-overall Architecture Analysis of android4.4.2 Image Library, android4.4.2
So far, the source code of the android image library that has been modified for more than a month has ended! The modified content is to remove the original ActionBar in the Image Library and then customize the ActionBar. To achieve the effect, all the events of the custom ActionBar must be bound to the click event on the original ActionBar. Therefore, you must analyze the overall architecture of the Image Library, the conversion relationships between interfaces, and the functions of most classes.
The modified information is as follows:
First of all, I have to say that the source code of the Image Library is really powerful. There are more than 500 classes in the local java code and a lot of JNI code. You can learn a lot from it.
1. Conversion between interfaces
There are three main interfaces: The display interface of an album set, the display interface of an album, and the display interface of an image or video. The conversion figure is as follows (this figure can be found in com. android. gallery3d. app. AlbumPage. java ):
1. album set class: AlbumSetPage. java.
2. album class: AlbumPage. java.
3. Image class: PhotoPage. java.
4. All actionbars are managed by class GalleryActionBar. java.
5. All menu events are managed by MenuExecutor. java.
6. Image trim class: FilterShowActivity. java.
7. Video trim class: TrimVideo. java.
Ii. Event Analysis
The main events are the display of images and videos and the control events on the ActionBar.
With hierarchyviewer, you can easily find the source code of each event by hitting a breakpoint and debugging with DDMS. This will not be analyzed here. If you are interested, you can debug it yourself.
After Samsung note3 updated 442, what is the red Android ,? Why do I need to set the phone number when I click it continuously? Urgent
The red figure shows the Android version!
Why I have already pressed android for several times, and only k pressed a few times, that is, there is no developer option on the android442 interface.