Android Listview Question:can Not Use In Layout Xml?
I try to write a xml like below xml,but always get an exception say that'Caused by: java.lang.UnsupportedOperationException: addView(View,LayoutParams) is not supported in Adapterv
Solution 1:
You cannot put a TextView
inside of a ListView
this way. You need to associate a ListAdapter
object with the ListView
.
Solution 2:
At last,I found scrollview is which I need.Thank you for you reply. Like as:
<ScrollView><LinearLayout><TextView/><TextView/>
...or something else
<TextView/></LinearLayout></ScrollView>
Post a Comment for "Android Listview Question:can Not Use In Layout Xml?"