Set Adapter to linearLayout instead of listView
问题 I am working on a layout that needs to adapt to the kind of data I receive. I need to make this as generic as possible. So the layout in my adapter class needs to be modified dynamically according to the data. This is how I plan to do so. My activity xml layout: <LinearLayout> <LinearLayout id="1" ></LinearLayout> <LinearLayout id="2" ></LinearLayout> <LinearLayout id="3" ></LinearLayout> <LinearLayout id="4" ></LinearLayout> <LinearLayout id="5" ></LinearLayout> </LinearLayout> I have