ListView 是手机系统中使用非常广泛的一种组件,它以垂直列表的形式显示所有列表项。
创建ListView的两种方式;
直接创建
让Activity继承ListActivity。
1.基于数组的ListView:
在布局文件中这么写:
<ListView
android:layout_width="fill_parent"
android:...
分类:
移动开发 时间:
2015-05-13 23:20:16
阅读次数:
352
效果布局文件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="...
分类:
其他好文 时间:
2015-05-13 21:56:18
阅读次数:
164
效果布局文件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="...
分类:
其他好文 时间:
2015-05-13 19:47:34
阅读次数:
223
Tab页面的布局R.layout.tabhost_layout:
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vert...
分类:
其他好文 时间:
2015-05-13 16:52:54
阅读次数:
116
<Button
????????????????android:id="@+id/btn_showcamera_usephoto"
????????????????android:layout_width="fill_parent"
????????????????android:layou...
分类:
移动开发 时间:
2015-05-12 16:01:12
阅读次数:
181
??
TextView 添加Selector的背景和颜色不能正常运行,原因,textview未设置clickable
android:id="@+id/tv_edit"
android:layout_width="63dp"
android:layout_height="25dp"
android:layout_alig...
分类:
其他好文 时间:
2015-05-12 15:42:52
阅读次数:
98
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:minHeight="30dp"
android:orientat...
分类:
移动开发 时间:
2015-05-12 11:30:56
阅读次数:
142
<LinearLayout?xmlns:android="http://schemas.android.com/apk/res/android"
????xmlns:tools="http://schemas.android.com/tools"
????android:layout_width="match_parent"
????android:layout_...
分类:
其他好文 时间:
2015-05-11 11:06:44
阅读次数:
332
在安卓的数据列表显示的时候,通常会用到ListView,所以列出下学习时候遇到的
1,用系统自定义的ListView
首先在xml文件中建立listview
<ListView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_h...
分类:
移动开发 时间:
2015-05-09 16:35:51
阅读次数:
169
图片省略了不上传了。。。
首先看activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent...
分类:
其他好文 时间:
2015-05-09 06:38:38
阅读次数:
168