Android: notifyDataSetChanged(); not working

后端 未结 8 1547
旧时难觅i
旧时难觅i 2020-11-28 10:33

I have a database in a server and from a Tablet I take some values from one table in the database. I load this information correctly into a list but I would like to know why

8条回答
  •  独厮守ぢ
    2020-11-28 11:14

    If everything you set fine and still not working then your list... Is it Mutablekind of the List or not...!

    private val demoList: MutableList = mutableListOf()
    

    once you define your list like above mutable manner then you can get the method

    .add
    .addAll
    .remove
    

    etc...

    else if you have created normal list then that will not work as notifyDataSetChanged

提交回复
热议问题