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.
小さなサイズの写真で構成されるギャラリーがあり、それらのいずれかをクリックすると、ギャラリーが画面に表示され、それらの小さな写真の大きな画像が表示されます。たとえば、ギャラリーの 3. 画像をクリックすると、2 番目の画面で 3. 画像を最初に表示したいのですが、左右にスクロールすると他の画像が表示されます。これどうやってするの?
選択したものを次の画面に渡し、int次のようにします。
int
galleryView.setSelection(3); //3 or whatever you send your position from previous screen
Adapterを に設定した後、忘れずにこれを行ってくださいGallery。
Adapter
Gallery