Properties in Viewpager

Source: Internet
Author: User

Android:id= "@+id/vpager"
Android:layout_width= "Wrap_content"
android:layout_height= "0DP"
android:layout_weight= "1"
android:layout_gravity= "Center"
Android:background= "#000000"
Android:flipinterval= "30"
android:persistentdrawingcache= "Animation"/>
The main explanation here is what the next two attributes mean.

I've always understood the time to switch between two pictures or two fragment and the online explanation is to set the display time for each view inside.
Actually, the big God on the Internet is right. If automatic switching is the display time of each view with viewflipper effect more obvious
And Viewpager is a manual switch, so it doesn't matter how much to write (but the default is to write 30 of their own test 30 and 3000 no difference)
PS: If it is wrong to look at the big God to point out after all the novice
Android:persistentdrawingcache; literally means  persistent painting cache;

This is actually the same meaning, the following is someone else to translate this game API

Persisting the cache consumes more memory, but may prevent frequent garbage collection from repeatedly creating the cache. By default, the persistence is set to scroll.
There are only a few of the following property values:


None 0x0 The drawing cache is not persisted after use .
Animation 0x1 The drawing cache is persisted after a layout animation.
(This property is used in most cases to mean that the drawing cache remains after the layout animation.) )
Scrolling 0x2 The drawing cache is persisted after a scroll.
All 0x3 The drawing cache are always persisted.

Properties in 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: 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.