<android.support.v4.view.viewpager
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:
Constant
Value
Description
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