Reputation: 2462
I have a requirement wherein I have to render a form from api which consists of different user input data such as name, data of birth, selection of country etc. For gathering this information from the user I am using multiple view types such as EditText, DatePicker, Spinner as view types inside RecyclerView with help of AdapterDelegates. The problem I am facing right now is retaining the contents of these view types if there are more than 6 items. Any idea on how to stop RecyclerView from recycling the view types and retaining its contents?
Upvotes: 1
Views: 158
Reputation: 84
You can try with setItemViewCacheSize(int) to the recycler but I don't think its the best practise.
Regards
Upvotes: 1