如何在android中将多媒体资料集中到特定位置?
我想在gallery视图中显示图像,它想使用android中的位置聚焦到特定的图像如何在android中将多媒体资料集中到特定位置?,android,image-gallery,Android,Image Gallery,我想在gallery视图中显示图像,它想使用android中的位置聚焦到特定的图像 SimpleAdapter adapter1 = new SimpleAdapter(ShowingGalleryActivity.this,arrList1, R.layout.showinggalleryview, new String[]{"image","company"}, new int[]{R.id.showinggalleryview_goggle_i
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);
在多媒体资料中尝试setselection(position)方法。参考您是否尝试阅读文档
public void setSelection (int position)
Since: API Level 1
Sets the currently selected item. To support accessibility subclasses that override this method must invoke the overriden super method first.
Parameters
position Index (starting at 0) of the data item to be selected.