android-gallery如何设置被选中的孩子的位置 [英] android-gallery how to set the position of the child which is selected

查看:67
本文介绍了android-gallery如何设置被选中的孩子的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们知道,被选中的孩子的默认位置在中间.但是我想在图库的左侧显示它.如何做到这一点.

as we know,the default position of the child which is selected is in the middle.but i want to show it in the gallery's left.how to do this.

谢谢〜

推荐答案

使用方法setSelection(int position)设置哪个项目将显示为选中状态.为了显示左侧,您只需要使用setSelection(0).简单...请通过 Rahul 查看给定的链接,以获取有关Gallery的更多信息

use the method setSelection(int position) to set which item will be shown as selected. For showing the left you have just use setSelection(0). simple... please check the given link by Rahul for more information about Gallery

这篇关于android-gallery如何设置被选中的孩子的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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