Android
android.widget
public class

android.widget.ViewAnimator

java.lang.Object
android.view.View Drawable.Callback KeyEvent.Callback
android.view.ViewGroup ViewManager ViewParent
android.widget.FrameLayout
android.widget.ViewAnimator
Known Direct Subclasses
Known Indirect Subclasses

Summary

XML Attributes inherited from class android.widget.FrameLayout
XML Attributes inherited from class android.view.ViewGroup
XML Attributes inherited from class android.view.View
Constants inherited from class android.view.ViewGroup
Constants inherited from class android.view.View
Fields inherited from class android.view.ViewGroup
Fields inherited from class android.view.View

Public Constructors

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

Public Methods

          void  addView(View child, int index, ViewGroup.LayoutParams params)
Adds a child view with the specified layout parameters.
          int  getBaseline()

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

          View  getCurrentView()
Returns the View corresponding to the currently displayed child.
          int  getDisplayedChild()
Returns the index of the currently displayed child view.
          Animation  getInAnimation()
Returns the current animation used to animate a View that enters the screen.
          Animation  getOutAnimation()
Returns the current animation used to animate a View that exits the screen.
          void  setAnimateFirstView(boolean animate)
Indicates whether the current View should be animated the first time the ViewAnimation is displayed.
          void  setDisplayedChild(int whichChild)
Sets which child view will be displayed.
          void  setInAnimation(Animation inAnimation)
Specifies the animation used to animate a View that enters the screen.
          void  setInAnimation(Context context, int resourceID)
Specifies the animation used to animate a View that enters the screen.
          void  setOutAnimation(Animation outAnimation)
Specifies the animation used to animate a View that exit the screen.
          void  setOutAnimation(Context context, int resourceID)
Specifies the animation used to animate a View that exit the screen.
          void  showNext()
Manually shows the next child.
          void  showPrevious()
Manually shows the previous child.
Methods inherited from class android.widget.FrameLayout
Methods inherited from class android.view.ViewGroup
Methods inherited from class android.view.View
Methods inherited from class java.lang.Object
Methods inherited from interface android.graphics.drawable.Drawable.Callback
Methods inherited from interface android.view.KeyEvent.Callback
Methods inherited from interface android.view.ViewManager
Methods inherited from interface android.view.ViewParent

Details

Public Constructors

public ViewAnimator(Context context)

public ViewAnimator(Context context, AttributeSet attrs)

Public Methods

public void addView(View child, int index, ViewGroup.LayoutParams params)

Adds a child view with the specified layout parameters.

Parameters

child the child view to add
index the position at which to add the child
params the layout parameters to set on the child

public int getBaseline()

Return the offset of the widget's text baseline from the widget's top boundary. If this widget does not support baseline alignment, this method returns -1.

Returns

  • the offset of the baseline within the widget's bounds or -1 if baseline alignment is not supported

public View getCurrentView()

Returns the View corresponding to the currently displayed child.

Returns

  • The View currently displayed.

public int getDisplayedChild()

Returns the index of the currently displayed child view.

public Animation getInAnimation()

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

Returns

  • An Animation or null if none is set.

public Animation getOutAnimation()

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

Returns

  • An Animation or null if none is set.

public void setAnimateFirstView(boolean animate)

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

Parameters

animate True to animate the current View the first time it is displayed, false otherwise.

public void setDisplayedChild(int whichChild)

Sets which child view will be displayed.

Parameters

whichChild the index of the child view to display

public void setInAnimation(Animation inAnimation)

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

Parameters

inAnimation The animation started when a View enters the screen.

public void setInAnimation(Context context, int resourceID)

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

Parameters

context The application's environment.
resourceID The resource id of the animation.

public void setOutAnimation(Animation outAnimation)

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

Parameters

outAnimation The animation started when a View exit the screen.

public void setOutAnimation(Context context, int resourceID)

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

Parameters

context The application's environment.
resourceID The resource id of the animation.

public void showNext()

Manually shows the next child.

public void showPrevious()

Manually shows the previous child.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56