1. First we look at the effect of the operation, as follows:
2. The following is the process of implementing this effect in detail:
(1) Create a new Android project named " Effect of the banner " as follows:
(2) A control Viewpager is used here, which is in the Android-support-v4.jar (Google provides extension toolkit). Inside this package, the tool control is declared using the full path name (the full pathname of the tool control is required in the activity or XML).
In the above Android-support-v4.jar found in the package Android.support.v4.view there are Viewpager.class, as follows:
But we found that the source of Viewpager.class is not related, the following operations:
After the build path is removed, the following:
Re-build the path as follows:
Once the rebuild is complete, such as:
At this time in the newly-born quoted library of "Android-support-v4.jar", find Viewpager.class, as follows:
Connect the source code as follows:
Path: D:\software\Android\SDT\android-sdk-windows\extras\android\support\v4\src\java
Click OK and the following results appear:
(3)
Custom controls (views) Phase 28 Note 03: Customizing the Control using System controls (banner Viewpager)