How to update an Spinner dynamically correctly?

前端 未结 3 848
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-18 09:09

I have a spinner with a custom adapter displaying objects from a database. When the object list changed I create a new adapter with the List and apply it on the spinner. Aft

3条回答
  •  梦毁少年i
    2020-12-18 09:41

    Did u tried notifydatasetChanged() or notifydatasetInvalidate() method of adapter.

    newAdapter.notifydatasetChanged()
    

提交回复
热议问题