您的位置:首页 > 移动开发 > Android开发

Android7.0中文文档(API)--- ViewFlipper

2017-06-13 18:06 543 查看

完整内容,请参考:http://www.zhdoc.net/android/reference/android/widget/ViewFlipper.html

ViewFlipper

public class ViewFlipper

extends

ViewAnimator


java.lang.Object
   ↳android.view.View
    ↳android.view.ViewGroup
     ↳android.widget.FrameLayout
      ↳android.widget.ViewAnimator
       ↳android.widget.ViewFlipper
Simple
ViewAnimator
that will animate between two or more views that have been added to it. Only one child is shown at a time. If requested,
can automatically flip between each child at a regular interval.

简化的
ViewAnimator
类,它将在两个或多个视图之间进行动画。每次只能显示一个子视图。如果需要,可以以一个固定的时间间隔在每个子视图之间翻转。

摘要

XML属性

android:autoStart
当为 true 时, 自动开始动画播放。
May be a boolean value, such as "
true
" or "
false
". 

布尔值,例如:“
true
” or “
false
”. 

android:flipInterval
 

继承XML属性



From
class
android.widget.ViewAnimator




From
class
android.widget.FrameLayout




From
class
android.view.ViewGroup




From
class
android.view.View


继承常量



From
class
android.view.ViewGroup




From
class
android.view.View


继承字段



From
class
android.view.View


Public构造方法

ViewFlipper(Context
context)
ViewFlipper(Context
context,
AttributeSet attrs)

Public方法

CharSequence
getAccessibilityClassName()

Return the class name of this object to be used for accessibility purposes.

返回此对象的类名,用于辅助功能目的。

boolean
isAutoStart()

Returns true if this view automatically calls
startFlipping()
when it becomes attached to a window.

返回true,如果当此视图附着在窗口时自动地调用了
startFlipping()


boolean
isFlipping()

Returns true if the child views are flipping.

如果子视图正在翻转,则返回true。

void
setAutoStart(boolean autoStart)

Set if this view automatically calls
startFlipping()
when it becomes attached to a window.

设置当此视图附着在窗口时,自动地调用了
startFlipping()


void
setFlipInterval(int milliseconds)

How long to wait before flipping to the next view

在翻转到下一个视图之前,等待多长时间。

void
startFlipping()

Start a timer to cycle through child views

启动一个定时器来循环子视图

void
stopFlipping()

No more flips

不再翻转

保护方法

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息