viewflipper get the current display child id
I have viewFlipper with three views insdie,
v1.id = 0
v2.id = 1
v3.id = 2
H开发者_Python百科ow could I know/get the current view id ?
i have textbox which i need to update according the current view id
getDisplayedChild()
returns sometimes numbers bigger then 3 like 4, 5
add only those three views only. i think you are adding views again and again so that the view's will be repeated and id will be more than 3. check your code again.
If you really need an id and not an index, then viewFlipper.getCurrentView().getId()
should work. Also it looks like you really have more than 3 views in your flipper.
精彩评论