Modify android4.4 Image Library Series 5-overall Architecture Analysis of android4.4.2 Image Library, android4.4.2

Source: Internet
Author: User

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.





Related Article

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.