Android:viewpager, indicator, fragment's relationship

Source: Internet
Author: User

Viewpager is a component that implements multi-page switching,Fragmentpageradapter the adapter that controls its multiple pages behind the scenes. Each page is a fragment.

Pageindicator determines the appearance of the "tab bar", there are many ways to implement the TAB bar:

    • Small Circle type of

    • With the icon type

    • A small horizontal line, a distance from the bottom end of the screen.

    • Label type (tab)

    • The title type is a bit like the label type, but its current title page's Left/right title will roll up, which is indented at both ends.

    • The horizontal line at the bottom of the screen and fills the entire row.


There are also third-party implementations of pageindicator components, such as Pagerslidingtabstrip. Indicator Controls page switching by calling Viewpager's Setcurrentitem () method through Setpager and Viewpager associations.






Android:viewpager, indicator, fragment's relationship

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.