如何将画廊聚焦到android中的特定位置?
我想在图库视图中显示图像,它想使用其在 android 中的位置来聚焦于特定图像
SimpleAdapter adapter1 = new SimpleAdapter(ShowingGalleryActivity.this,arrList1, R.layout.showinggalleryview, new String[]{"image","company"},
new int[]{R.id.showinggalleryview_goggle_iv,R.id.showinggalleryview_companyname_tv}
);
mGallery.setDescendantFocusability(position);
mGallery.setAdapter(adapter1);
I want display images in gallery view it want to focus to paticular image using its position in android
SimpleAdapter adapter1 = new SimpleAdapter(ShowingGalleryActivity.this,arrList1, R.layout.showinggalleryview, new String[]{"image","company"},
new int[]{R.id.showinggalleryview_goggle_iv,R.id.showinggalleryview_companyname_tv}
);
mGallery.setDescendantFocusability(position);
mGallery.setAdapter(adapter1);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试图库中的 setselection(position) 方法。请参阅http://developer.android.com/reference/android/widget/Gallery。 html
Try the setselection(position) method in the Gallery. Refer http://developer.android.com/reference/android/widget/Gallery.html
您尝试阅读文档吗?
Did you try reading the documentation?