liunx密码破译
2011-10-27 08:56
323 查看
何谓 AdapterView 以前有说过 就是如下几个View:
写道
ListView
Gallery
GridView
Spinner
至于布局 系统已经为我们定义了一下 比如:
但是系统肯定不能满足我们的需要 所以有时候我们得根据界面的需要自定义 这有2种方法:
1. 自定义BaseAdapter 并实现其 getView()
2. 自定义界面 然后在Adapter中使用之
写道
Adapter 显示中 每一行就是一个View 你可以把这个View 定义成任何子布局
* 现在有程序要求显示3个TextView 假设该布局如下:simple_adapter_g3.xml
* 如何使用
* emulator 运行截图为:
写道
ListView
Gallery
GridView
Spinner
至于布局 系统已经为我们定义了一下 比如:
android.R.layout.simple_list_item_1 android.R.layout.simple_list_item_2 android.R.layout.simple_list_item_3 ...
但是系统肯定不能满足我们的需要 所以有时候我们得根据界面的需要自定义 这有2种方法:
1. 自定义BaseAdapter 并实现其 getView()
但是 有时候 我们要显示的数据源也是其支持的TextView 自定义BaseAdapter 好像有点舍本逐末了 得不偿失
2. 自定义界面 然后在Adapter中使用之
写道
Adapter 显示中 每一行就是一个View 你可以把这个View 定义成任何子布局
* 现在有程序要求显示3个TextView 假设该布局如下:simple_adapter_g3.xml
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="0" android:padding="5dp"> <LinearLayout android:orientation="horizontal" > <TextView android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="16sp" android:textColor="#FFC8FF" android:textStyle="bold|italic" /> <TextView android:id="@+id/text3" android:layout_width="wrap_content" android:layout_height="fill_parent" android:textSize="16sp" android:layout_marginLeft="50px" /> </LinearLayout> <TextView android:id="@+id/text2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="16sp" android:textStyle="bold"/> </TableLayout>
* 如何使用
String[] from={COLUMN_1,COLUMN_2,COLUMN_3}; int[] to={R.id.text1,R.id.text2, R.id.text3}; SimpleAdapter adapter = new SimpleAdapter(this,people,R.layout.simple_adapter_g3,from,to);
* emulator 运行截图为:
相关文章推荐
- liunx密码破译
- 破译私信挑战QQ的关键密码
- 线性移位寄存序列密码破译
- 破译圣经科学密码—上帝的复活(转载)(六)
- 公司电脑要有网管破译密码,用完了也不关机
- liunx下修改mysql的root密码
- 北大ACM poj3749 破译密码
- 杭电 1287 破译密码
- HDU 1287 破译密码
- 实现liunx之间无密码访问——ssh密匙
- 崮云湖街道:“钉钉子”精神破译发展密码
- 华为机试——简单密码破译
- liunx下mysql找回密码
- 破译密码 动态规划 重庆一中高2018级竞赛班第十次测试 2016.9.16 Problem 3
- IBM破译智慧教育的密码
- 使用MD5变换算法防穷举(冲撞)破译密码 选择自 Purpleendurer 的 Blog
- Tyvj 1296 破译密码
- 至今仍未被破译的五个世界级密码
- 破译成功团队的密码
- 小 X 的密码破译