开发者

viewflipper get the current display child id

开发者 https://www.devze.com 2023-03-27 00:36 出处:网络
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 viewFlipper with three views insdie,

  1. v1.id = 0

  2. v2.id = 1

  3. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消