Array-based ListView
Listview1.xml
<?xml version= "1.0" encoding= "Utf-8"? ><linearlayout xmlns:android= "http://schemas.android.com/apk/res/ Android "Android:layout_width=" Match_parent "android:layout_height=" match_parent "> <listview android:la Yout_width= "Wrap_content" android:layout_height= "wrap_content" android:id= "@+id/listview" Android:div Ider= "#f00" android:dividerheight= "2px" android:entries= "@array/xiaocool" android:headerdividersenabl Ed= "false"/></linearlayout>
Arrays.xml
<?xml version= "1.0" encoding= "Utf-8"?><resources> <string-array name= "Xiaocool" > <item> School Cool 1</item> <item> School Cool 2</item> <item> School Cool 3</item> <item> School Cool 4</item> ; </string-array></resources>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5B/3D/wKioL1UDiumy6qKpAAEYsD9FxCU142.jpg "title=" Qq20150314090525.png "alt=" Wkiol1udiumy6qkpaaeysd9fxcu142.jpg "/>
This article is from the "Ahu-on-the-road" blog, be sure to keep this source http://xiaocool.blog.51cto.com/1593956/1620314
Use of Android learning--listview (i)