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

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

ViewAnimator

public class ViewAnimator
extends FrameLayout

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


Base class for a FrameLayout container that will perform animations when switching between its views.
FrameLayout容器的基类,它可以在视图之间转换时执行动画。

摘要


XML属性

android:animateFirstView设定当首次显示ViewAnimation时,是否对当前view呈现动画效果。 
android:inAnimation当视图被显示时,呈现动画效果的动画。 
android:outAnimation当视图被隐藏时,呈现动画效果的动画。 

继承XML属性

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

ViewAnimator(Context context)
ViewAnimator(Context context, AttributeSet attrs)

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.
返回此对象的类名,用于辅助功能目的。

booleangetAnimateFirstView()

Returns whether the current View should be animated the first time the ViewAnimator is displayed.
返回当前视图在ViewAnimator第一次显示时,是否进行动画。

intgetBaseline()

Return the offset of the widget's text baseline from the widget's top boundary.
返回widget文本基线的偏移,其从widget的顶部边界开始。

ViewgetCurrentView()

Returns the View corresponding to the currently displayed child.
返回与当前显示的子项相对应的视图。

intgetDisplayedChild()

Returns the index of the currently displayed child view.
返回当前显示的子视图的索引。

AnimationgetInAnimation()

Returns the current animation used to animate a View that enters the screen.
返回当前Animation对象,其对进入屏幕的视图进行动画。

AnimationgetOutAnimation()

Returns the current animation used to animate a View that exits the screen.
返回当前Animation对象,其对退出屏幕的视图进行动画。

voidremoveAllViews()

Call this method to remove all child views from the ViewGroup.
调用此方法,从ViewGroup中移除所有的子视图。

voidremoveView(View view)

Note: do not invoke this method from draw(android.graphics.Canvas), onDraw(android.graphics.Canvas), dispatchDraw(android.graphics.Canvas) or any related method.
注意:请勿从draw(android.graphics.Canvas)onDraw(android.graphics.Canvas)dispatchDraw(android.graphics.Canvas)或任何相关的方法,调用此方法。

voidremoveViewAt(int index)

Removes the view at the specified position in the group.
移除ViewGroup中指定索引位置的视图。

voidremoveViewInLayout(View view)

Removes a view during layout.
在布局时,移除一个视图。

voidremoveViews(int start, int count)

Removes the specified range of views from the group.
从组中移除特定范围的视图。

voidremoveViewsInLayout(int start, int count)

Removes a range of views during layout.
在布局时,移除特定范围的视图。

voidsetAnimateFirstView(boolean animate)

Indicates whether the current View should be animated the first time the ViewAnimator is displayed.
设置当前视图在ViewAnimator第一次显示时,是否进行动画。

voidsetDisplayedChild(int whichChild)

Sets which child view will be displayed.
设置要显示的子视图。

voidsetInAnimation(Context context, int resourceID)

Specifies the animation used to animate a View that enters the screen.
设置Animation对象,其对进入屏幕的视图进行动画。

voidsetInAnimation(Animation inAnimation)

Specifies the animation used to animate a View that enters the screen.
设置Animation对象,其对进入屏幕的视图进行动画。

voidsetOutAnimation(Animation outAnimation)

Specifies the animation used to animate a View that exit the screen.
设置Animation对象,其对退出屏幕的视图进行动画。

voidsetOutAnimation(Context context, int resourceID)

Specifies the animation used to animate a View that exit the screen.
设置Animation对象,其对退出屏幕的视图进行动画。

voidshowNext()

Manually shows the next child.
手动显示下一个子视图。

voidshowPrevious()

Manually shows the previous child.
手动显示上一个子视图。

继承方法

From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.view.ViewParent
From interface android.view.ViewManager
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

XML属性


android:animateFirstView

Defines whether to animate the current View when the ViewAnimation is first displayed.
设定当首次显示ViewAnimation时,是否对当前view呈现动画效果。

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值