Added in API level 1

ViewAnimator


open class ViewAnimator : FrameLayout
kotlin.Any
   ↳ 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.

Summary

XML attributes
android:animateFirstView Defines whether to animate the current View when the ViewAnimation is first displayed.
android:inAnimation Identifier for the animation to use when a view is shown.
android:outAnimation Identifier for the animation to use when a view is hidden.
Inherited XML attributes
Inherited constants
Public constructors
ViewAnimator(context: Context!)

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

Public methods
open Unit
addView(child: View!, index: Int, params: ViewGroup.LayoutParams!)

Adds a child view with the specified layout parameters.

open CharSequence!

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

open Boolean

Returns whether the current View should be animated the first time the ViewAnimator is displayed.

open Int

Return the offset of the widget's text baseline from the widget's top boundary.

open View!

Returns the View corresponding to the currently displayed child.

open Int

Returns the index of the currently displayed child view.

open Animation!

Returns the current animation used to animate a View that enters the screen.

open Animation!

Returns the current animation used to animate a View that exits the screen.

open Unit

Call this method to remove all child views from the ViewGroup.

open Unit
removeView(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.

open Unit
removeViewAt(index: Int)

Removes the view at the specified position in the group.

open Unit

Removes a view during layout.

open Unit
removeViews(start: Int, count: Int)

Removes the specified range of views from the group.

open Unit
removeViewsInLayout(start: Int, count: Int)

Removes a range of views during layout.

open Unit

Indicates whether the current View should be animated the first time the ViewAnimator is displayed.

open Unit
setDisplayedChild(whichChild: Int)

Sets which child view will be displayed.

open Unit
setInAnimation(context: Context!, resourceID: Int)

Specifies the animation used to animate a View that enters the screen.

open Unit
setInAnimation(inAnimation: Animation!)

Specifies the animation used to animate a View that enters the screen.

open Unit
setOutAnimation(context: Context!, resourceID: Int)

Specifies the animation used to animate a View that exit the screen.

open Unit
setOutAnimation(outAnimation: Animation!)

Specifies the animation used to animate a View that exit the screen.

open Unit

Manually shows the next child.

open Unit

Manually shows the previous child.

Inherited functions