How to get ViewFlipper's current child position

后端 未结 4 1186
刺人心
刺人心 2021-02-12 01:40

I have added a bunch of images to a ViewFlipper and now I am performing an onClick event in the flipper. For this I would like to know the current child position so that I can p

4条回答
  •  清歌不尽
    2021-02-12 02:07

    Use this to get the current Child position:

    flipper.getDisplayedChild();
    

    And this to set child number to view:

    flipper.setDisplayedChild(8);
    

提交回复
热议问题