Search code examples
androidandroid-gallery

How can I set a default selected item for my gallery?


I have a gallery and I want to set a default selected item when I launch the activity.

The goal is to have the contain of the first item appears automatically.

Is there anyway to do this ?

thx a lot for answers.


Solution

  • Use method setSelection(position, animate)