Custom controls (views) Phase 28 Note 03: Customizing the Control using System controls (banner Viewpager)

Source: Internet
Author: User

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)

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.