![]() ![]() Here is the code of my adapter : class EventsCalendarAdapter(var eventSectionedFrag: EventSectionedFrag, var arrayList: ArrayList) : RecyclerView. Any help would be greatly appreciated as I work a lot with RecyclerViews. Through a demo we realize that notifyDatasetChanged forces. For the cell at scrolled out position, system dont even call the notifyDataSetChanged(positioin, payLoad) method to make ui in it. In this video we further dissect the usage of notifyDatasetChanged method of RecyclerView.Adapter. ![]() But when the cell at currently selected position is scrolled out of the screen and I try to select new position, however the new cell grabs the highlighting and becomes selected, it does not makes previously selected cell white. If i click the cell at different position, the view at that position becomes selected & highlighted, simultaneously previously selected view becomes white ie unselected.Ībove works fine as I use adapter.notifyDataSetChanged(position, payLoad) method to update data in the list. Now When the list loads, the first cell becomes highlighted as default selected position. I am using RecyclerView in my app, it has itemViewCache of 20 items because max possible size of my list would be 20.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |