我如何编程显示ViewFlipper的第二个孩子? [英] How can I programmatically display a ViewFlipper's second child?
问题描述
我有3个孩子一个ViewFlipper。
我希望能够在最初显示这些孩子。因此,例如,也许我想ViewFlipper与第二个孩子,而不是最初一号装载。
编辑:
我知道我可以使用getChildAt(INT指数)方法。
当显示在ViewFlipper一个孩子,我怎么能得到孩子的指数?
我希望能够在最初显示这些孩子。因此,例如,也许我想ViewFlipper
与第二个孩子,而不是最初一号装载。
块引用>呼叫
setDisplayedChild()
。
当在ViewFlipper孩子所示,我怎么能得到孩子的指数?
块引用>呼叫
getDisplayedChild()
。I have a ViewFlipper with 3 children.
I want to be able to display any of these children initially. So for example, maybe I want the ViewFlipper to load initially with the 2nd child and not the 1st.
EDIT: I know I can use the getChildAt(int index) method.
When a child in a ViewFlipper is shown, how can I get that child's index?
解决方案I want to be able to display any of these children initially. So for example, maybe I want the ViewFlipper to load initially with the 2nd child and not the 1st.
Call
setDisplayedChild()
.When a child in a ViewFlipper is shown, how can I get that child's index?
Call
getDisplayedChild()
.这篇关于我如何编程显示ViewFlipper的第二个孩子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!