10-listView视图

来源:互联网 发布:大数据生态圈 编辑:程序博客网 时间:2024/05/18 04:55



1.listView视图在composite中

2.在value上面单击右键选择新建xml文件,然后在添加String array到xml文件中去。

3.


引入的代码:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="fill_parent"    android:layout_height="wrap_content" >    <ListView        android:id="@+id/listView1"        android:layout_height="wrap_content"        android:layout_weight="1"        android:divider="@drawable/ic_launcher"        android:entries="@array/books" >    </ListView></LinearLayout>