设置Android图库小工具来显示特定图像开始 [英] Set Android Gallery widget to show specific starting image
问题描述
我有个任务,用户可以从一个GridView重新presenting相册选择图像,并从这个我开始它显示一个画廊控件来显示相册的图像的新活动。不过,我似乎无法得到图库部件显示相册的内容与给定的形象为出发点。理想情况下,我想一个画廊#setStartingImage(INT位置)或类似的东西。
I have a task where the user can select an image from a GridView representing a photo album, and from this I start a new activity which displays a Gallery widget to show the images of the photo album. However, I can't seem to get the Gallery widget to show the contents of the photo album with a given image as the starting point. Ideally I would like a Gallery#setStartingImage(int position) or something similar.
任何意见将大大AP preciated。
Any ideas would be greatly appreciated.
推荐答案
看起来有点深入画廊的继承层次后,我发现该方法setSelection(),其中库扩展AbsSpinner类中定义。这似乎做的工作。
After looking a little deeper into the inheritance hierarchy of Gallery, I found the method setSelection() defined in the AbsSpinner class which Gallery extends. This seems to do the job.
这篇关于设置Android图库小工具来显示特定图像开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!