RecyclerView not showing anything after updating Adapter data

后端 未结 2 1926
谎友^
谎友^ 2020-12-21 20:47

guys i need help with this matter i have been going through my code for a couple of days to figure whats going wrong but i couldn\'t figure it out. I have a fragment with a

2条回答
  •  一向
    一向 (楼主)
    2020-12-21 21:41

    I did call notifyDataSetChanged but this was not the issue after alooooooooot of testing and Logging the problem was with setAdapterData method where i just passed the data reference from the loader to the adapter but this didn't work and i had to clone the arraylist instead of just passing the reference which sounds strange to me and i still don't understand why I had to do that if you can take a look at the setAdapterData method in MyGridAdapter class and tell me what do you think

提交回复
热议问题