A good rule of thumb is that if you have to scroll the list, use a RecyclerView. Instead, use it to bind to a small set of Views that are all visible within your layout. Data Binding lists is not a replacement for RecyclerView. You may be tempted to use the list binding technique instead of RecyclerView. Often developers will loop through their entries and create Views manually: for (Account item : items) Considerations What if you have a list of elements and don’t really need a RecyclerView to handle it? After all, if you’re only going to show three or four elements on the screen and they are never going to be recycled, there’s no need to bring out the big guns. I was thinking about the previous article in which I wrote about using Android Data Binding with RecyclerView.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |