How to update a spinner dynamically?

后端 未结 10 1132
北荒
北荒 2020-12-08 02:32

I\'ve been trying to update my spinner in android dynamically but nothing I try has been working.

This is the following code I\'m using to update the spinner.

10条回答
  •  有刺的猬
    2020-12-08 03:20

    You only need to call setAdapter() once and you call adapter.notifyDataSetChanged() to update the data.

提交回复
热议问题