完整内容,请查看: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个子视图,并且一次只能显示一个。
摘要
嵌套类 | |
|---|---|
interface | ViewSwitcher.ViewFactory Creates views in a ViewSwitcher. |
继承XML属性 | |
|---|---|
android.widget.ViewAnimator
| |
android.widget.FrameLayout
| |
android.view.ViewGroup
| |
android.view.View
| |
继承常量 |
|---|
android.view.ViewGroup
|
android.view.View
|
继承字段 |
|---|
android.view.View
|
Public构造方法 | |
|---|---|
ViewSwitcher(Context context) Creates a new empty ViewSwitcher. | |
ViewSwitcher(Context context, AttributeSet attrs) Creates a new empty ViewSwitcher for the given context and with the specified set attributes. | |
Public方法 | |
|---|---|
void | addView(View child, int index, ViewGroup.LayoutParams params) Adds a child view with the specified layout parameters. |
CharSequence | getAccessibilityClassName() Return the class name of this object to be used for accessibility purposes. |
View | getNextView() Returns the next view to be displayed. |
void | reset() Reset the ViewSwitcher to hide all of the existing views and to make it think that the first time animation has not yet played. |
void | setFactory(ViewSwitcher.ViewFactory factory) Sets the factory used to create the two views between which the ViewSwitcher will flip. |
618


--- ViewSwitcher&spm=1001.2101.3001.11974&articleId=73189180&d=1&t=3&u=528c4cfbf1884e52a73d76523288fd21)

被折叠的 条评论
为什么被折叠?



