|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.view.View
android.view.ViewGroup
android.widget.FrameLayout
android.widget.ViewAnimator
public class ViewAnimator
Base class for a FrameLayout container that will perform animations
when switching between its views.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class android.widget.FrameLayout |
|---|
FrameLayout.LayoutParams |
| Nested classes/interfaces inherited from class android.view.ViewGroup |
|---|
ViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListener |
| Nested classes/interfaces inherited from class android.view.View |
|---|
View.BaseSavedState, View.MeasureSpec, View.OnClickListener, View.OnCreateContextMenuListener, View.OnFocusChangeListener, View.OnKeyListener, View.OnLongClickListener, View.OnTouchListener |
| Field Summary | |
|---|---|
(package private) boolean |
mAnimateFirstTime
|
(package private) boolean |
mFirstTime
|
(package private) Animation |
mInAnimation
|
(package private) Animation |
mOutAnimation
|
(package private) int |
mWhichChild
|
| Fields inherited from class android.widget.FrameLayout |
|---|
mMeasureAllChildren |
| Constructor Summary | |
|---|---|
ViewAnimator(Context context)
|
|
ViewAnimator(Context context,
AttributeSet attrs)
|
|
| Method Summary | |
|---|---|
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. |
(package private) void |
showOnly(int childIndex)
Shows only the specified child. |
void |
showPrevious()
Manually shows the previous child. |
| Methods inherited from class android.widget.FrameLayout |
|---|
checkLayoutParams, draw, drawableStateChanged, gatherTransparentRegion, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getConsiderGoneChildrenWhenMeasuring, getForeground, onLayout, onMeasure, onSizeChanged, setForeground, setForegroundGravity, setMeasureAllChildren, verifyDrawable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface android.view.ViewParent |
|---|
createContextMenu, getParent, isLayoutRequested, requestLayout |
| Field Detail |
|---|
int mWhichChild
boolean mFirstTime
boolean mAnimateFirstTime
Animation mInAnimation
Animation mOutAnimation
| Constructor Detail |
|---|
public ViewAnimator(Context context)
public ViewAnimator(Context context,
AttributeSet attrs)
| Method Detail |
|---|
public void setDisplayedChild(int whichChild)
whichChild - the index of the child view to displaypublic int getDisplayedChild()
public void showNext()
public void showPrevious()
void showOnly(int childIndex)
out animation and the specified child
enters the screen with the in animation.
childIndex - The index of the child to be shown.
public void addView(View child,
int index,
ViewGroup.LayoutParams params)
ViewGroup
addView in class ViewGroupchild - the child view to addindex - the position at which to add the childparams - the layout parameters to set on the childpublic View getCurrentView()
getDisplayedChild()public Animation getInAnimation()
setInAnimation(android.view.animation.Animation),
setInAnimation(android.content.Context, int)public void setInAnimation(Animation inAnimation)
inAnimation - The animation started when a View enters the screen.getInAnimation(),
setInAnimation(android.content.Context, int)public Animation getOutAnimation()
setOutAnimation(android.view.animation.Animation),
setOutAnimation(android.content.Context, int)public void setOutAnimation(Animation outAnimation)
outAnimation - The animation started when a View exit the screen.getOutAnimation(),
setOutAnimation(android.content.Context, int)
public void setInAnimation(Context context,
int resourceID)
context - The application's environment.resourceID - The resource id of the animation.getInAnimation(),
setInAnimation(android.view.animation.Animation)
public void setOutAnimation(Context context,
int resourceID)
context - The application's environment.resourceID - The resource id of the animation.getOutAnimation(),
setOutAnimation(android.view.animation.Animation)public void setAnimateFirstView(boolean animate)
animate - True to animate the current View the first time it is displayed,
false otherwise.public int getBaseline()
ViewReturn 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.
getBaseline in class View
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||