如何获得ViewFlipper当前孩子位置 [英] How to get ViewFlipper's current child position

查看:1003
本文介绍了如何获得ViewFlipper当前孩子位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加了一堆图像到ViewFlipper,现在我执行onClick事件的鳍状肢。为此,我想知道目前孩子的位置,这样我可以在阵列中执行某些操作。反正有了解当前孩子的位置。

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 perform some operations in an array. Is there anyway to find out the position of the current child.

推荐答案

使用此来获得当前儿童的位置是:

Use this to get the current Child position:

flipper.getDisplayedChild();

和它来设置子编号,以查看:

And this to set child number to view:

flipper.setDisplayedChild(8);

这篇关于如何获得ViewFlipper当前孩子位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆