Implement RecycleView

0

Good people, I am trying to implement a recycleView, the thing is this, I have several layouts, which have many fields (editText, textView, etc). Since there are so many fields I can not load them all of one but it is very overloaded, I need a way to load them in a progressive way, so to call it, someone has some example of how to implement the recycleView loading the layout as you scroll? Or some other way of how to solve this problem. Thanks !!

    
asked by JBeccaceci 06.03.2017 в 15:49
source

1 answer

1

If you do not have two view that have the same widgets layout (what is called layout in English) it does not make any sense to implement the recycleView.

The logical thing is that you categorize the types of objects in the list, and decide what each type contains:

Type 1: 1 EditView and a ButtonView

Type 2: 1 Button View and 2 ImageView

etc ...

to each object in your array (or cursor, or whatever you represent), you assign a type from the previous list, and when you load it in your adapter, you recycle a view of the same type.

    
answered by 06.03.2017 в 19:17