Android Spinner.setSelection() doesn't work

后端 未结 2 1495

I\'m having a spinner which is populated with a CursorAdapter. Now when creating that spinner (dynamically) I want to set a default selection different to 0 (0

2条回答
  •  [愿得一人]
    2021-01-11 13:24

    Try Spinner#setSelection (int position, boolean animate) with animate = false. I remember a while back I had a similar problem and this did the trick. The internal implementation seems to differ apart from the difference coming from the animate part.

提交回复
热议问题