Android开发笔记之ArrayAdapter

1,ArrayAdapter的item中的条目的布局文件的正确写法:

item.xml


android:id="@+id/tv_2"
android:layout_width="match_parent"
android:layout_height="match_parent" />

 

 

2,错误用法

不能像下面这样使用布局,即不能在布局中使用

android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
android:id="@+id/tv_my"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>


你可能感兴趣的:(Android开发笔记之ArrayAdapter)