Is it possible to set adapter to a LinearLayout
?
I don\'t want to use ListView
since I am using ScrollView
.
so I am using Li
no you can't. What you can do is inflate the single row, and adding to the LinearLayout. In pseudo code:
LinearLayout linearLayout = (LinearLayout) findViewById(...);
LayoutInflater inflater = LayoutInflater.from(this);
for (item in arrayList) {
View view = inflater.inflate(R.layout.row, linearLayout, false);
// set item content in view
linearLayout.addView(view)
}