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

完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/ViewSwitcher.html

ViewSwitcher

public class ViewSwitcher
extends ViewAnimator

java.lang.Object
   ↳android.view.View
    ↳android.view.ViewGroup
     ↳android.widget.FrameLayout
      ↳android.widget.ViewAnimator
       ↳android.widget.ViewSwitcher
已知的直接子类


ViewAnimator that switches between two views, and has a factory from which these views are created. You can either use the factory to create the views, or add them yourself. A ViewSwitcher can only have two child views, of which only one is shown at a time.
ViewAnimator 在两个视图之间进行切换,并有一个工厂方法创建这些视图。你可以选择使用工厂方法创建视图,或者自己添加视图。一个ViewSwitcher对象只能拥有2个子视图,并且一次只能显示一个。

摘要


嵌套类

interfaceViewSwitcher.ViewFactory

Creates views in a ViewSwitcher. 
创建ViewSwitcher中的视图。 

继承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构造方法

ViewSwitcher(Context context)

Creates a new empty ViewSwitcher.
创建一个新的空ViewSwitcher。

ViewSwitcher(Context context, AttributeSet attrs)

Creates a new empty ViewSwitcher for the given context and with the specified set attributes.
为指定的Context和指定的AttributeSet创建一个新的空ViewSwitcher。

Public方法

voidaddView(View child, int index, ViewGroup.LayoutParams params)

Adds a child view with the specified layout parameters.
添加具有指定布局参数的子视图。

CharSequencegetAccessibilityClassName()

Return the class name of this object to be used for accessibility purposes.
返回此对象的类名,用于辅助功能目的。

ViewgetNextView()

Returns the next view to be displayed.
返回将要显示的下一个视图。

voidreset()

Reset the ViewSwitcher to hide all of the existing views and to make it think that the first time animation has not yet played.
重置ViewSwitcher以隐藏所有的已存在的视图,并使它认为第一次动画还没有播放。

voidsetFactory(ViewSwitcher.ViewFactory factory)

Sets the factory used to create the two views between which the ViewSwitcher will flip.
设置工厂方法,用于创建由ViewSwitcher翻转的2个视图。

继承方法


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值