Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I have an pictureGallery = (Gallery) findViewById(R.id.imageGallery);
howto set index to picture 10 as sample and simulate a click on img 10 ?
thx
为了选择图片 10 只需要:
pictureGallery.setSelection(10);
要模拟对 img 10 的点击,您可以简单地为位置 10 运行相应的 OnItemClicked 代码。