Android Spinner: Set selected item as default

后端 未结 4 504
甜味超标
甜味超标 2021-01-14 06:22

I am making an android app that asks for the users to select a country via spinner.

When the user opens the app first time, user selects a country from list.

<
4条回答
  •  死守一世寂寞
    2021-01-14 06:55

    Use spinner method to show selected item

        spinner.setSelection(position);
    

    Here position is the last selected position

提交回复
热议问题