View recycler and line layout inside scroll?

I am trying to create a scrollable page. Functions is a regular list to delete an item by clicking on it. The number of items in this list is limited and dynamically added by the user. You can consider the to-do list as an example. Now, what would be the best approach to implementing it? View recycler with data attached to its adapter? Or a normal linear layout with elements added as children at runtime?

My current implementation is viewing recyclers. But, I found that lag and animation did not work well. Thus, the linear layout is automatically animated by specifying its xml - by setting the animation layout changes to true.

FYI data is local and synchronized in the background.

+4
source share
1 answer

Never use LinearLayoutfor anything more than one screen. The whole meaning ListViewand RecyclerViewis effective reuse of ideas rather than having to store things in memory, when they are not visible. Perhaps you can clarify or re-ask your question so that people can help you with any difficulty you encounter in the animation rather than avoid the problem.

+4
source

Source: https://habr.com/ru/post/1616314/


All Articles