Android --ListView模板
调整了近一上午的模板
ListView表头
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/array_header_area"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#EEEEEE"
android:gravity="center"
android:padding="5dp"
android:singleLine="false"
android:text="仪表"
android:textColor="#949494"
android:textSize="15sp"
android:layout_weight="1">
</TextView>
<TextView
android:id="@+id/array_data_header"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#EEEEEE"
android:gravity="center"
android:padding="5dp"
android:singleLine="false"
android:text="数值"
android:textColor="#949494"
android:textSize="15sp"
android:layout_weight="1.4">
</TextView>
<TextView
android:id="@+id/array_time_header"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#EEEEEE"
android:gravity="center"
android:padding="5dp"
android:singleLine="false"
android:text="时间"
android:textColor="#949494"
android:textSize="15sp"
android:layout_weight="1.4">
</TextView>
<TextView
android:id="@+id/array_limit_header"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#EEEEEE"
android:gravity="center"
android:padding="5dp"
android:singleLine="false"
android:text="阀值"
android:textColor="#949494"
android:textSize="15sp"
android:layout_weight="1.4">
</TextView>
</LinearLayout>
ListView项目
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:padding="5dp"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:gravity="center"
android:padding="5dp"
>
<TextView android:id="@+id/array_area"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:gravity="center"
/>
<TextView android:id="@+id/array_dev"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@drawable/text_gray_color"
android:textSize="15sp"
android:gravity="center"
/>
</LinearLayout>
<TextView android:id="@+id/array_data"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textSize="18sp"
android:layout_weight="1.4"
android:gravity="center"
android:padding="5dp"
/>
<TextView android:id="@+id/array_updatetime"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textSize="12sp"
android:layout_weight="1.4"
android:gravity="center"
android:padding="5dp"
/>
<TextView android:id="@+id/array_limit"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textSize="15sp"
android:layout_weight="1.4"
android:gravity="center"
android:padding="5dp"
/>
</LinearLayout >
主要使用了Layout_Weight属性
参考文献:Android:Layout_weight的深刻理解
Android --ListView模板的更多相关文章
- android ListView 九大重要属性详细分析、
android ListView 九大重要属性详细分析. 1.android ListView 一些重要属性详解,兄弟朋友可以参考一下. 首先是stackFromBottom属性,这只该属性之后你做好 ...
- Android ListView onItemClick Not Work
Android ListView onItemClick Not Work ListView item中有Button和RadioButton的时候,它的Item点击事件不起作用,需要设置item的属 ...
- 【腾讯Bugly干货分享】Android ListView与RecyclerView对比浅析--缓存机制
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/5811d3e3ab10c62013697408 作者:黄宁源 一,背景 Recy ...
- Android ListView 常用技巧
Android ListView 常用技巧 Android TextView 常用技巧 1.使用ViewHolder提高效率 ViewHolder模式充分利用了ListView的视图缓存机制,避免了每 ...
- Android listview addHeaderView 和 addFooterView 详解
addHeaderView()方法:主要是向listView的头部添加布局addFooterView()方法:主要是向listView的底部添加布局 需要注意的是添加布局的时候应该添加从父容器开始添加 ...
- Android ListView滑动过程中图片显示重复错乱闪烁问题解决
最新内容建议直接访问原文:Android ListView滑动过程中图片显示重复错乱闪烁问题解决 主要分析Android ListView滚动过程中图片显示重复.错乱.闪烁的原因及解决方法,顺带提及L ...
- Android --ListView分页
参考博客:Android ListView分页加载(服务端+android端)Demo 监听OnScrollListener事件 class OnListScrollListener implemen ...
- Android ListView ListActivity PreferenceActivity背景变黑的问题ZT
Android ListView ListActivity PreferenceActivity背景变黑的问题 ListView在滚动时背景会变暗甚至变黑,这个要从Listview的效果说起,默认的L ...
- android listview去掉分割线
1:android listview去掉分割线 1>设置android:divider="@null" 2>android:divider="#0000000 ...
随机推荐
- Geronimo应用服务器和MySQL数据库服务器
就是Web 2.0的全部,尽管该术语出现才几乎一年的时间,但现在好像只有烹饪杂志还没有加入到讨论Web 2.0未来出路的行列中.自从出现了里程碑式的文章"What Is Web 2.0:De ...
- [办公自动化]Wlan无法启动,无法连接无线网wifi,所有无线网都搜索不到
转帖: http://support1.lenovo.com.cn/lenovo/wsi/htmls/detail_20121023172943554.html 故障现象: 启动wlan autoco ...
- DX11.2 Tiled Resource Pool
Nvidia white paper : https://developer.nvidia.com/content/taking-advantage-directx112-tiled-resource ...
- 【翻译】CEDEC2014跨世代多平台并行开发PS4版如龙维新开发的一年
本篇PPT讲述的是如龙4的开发过程中,集中在PS3和PS4并行开发中所遇到和解决的一些问题.如64位指针,DX9向DX11移植API的问题,以及在PS4上使用并行渲染在1080P下让FPS达到60等. ...
- ThinkPHP的cookide保存二维数组的方法
ThinkPHP中的cookie是不支持二维数组的. 如果要保存二维数组.只能特殊处理 $data[263] = array('gid'=>263,'num'=>1); $data[266 ...
- 提高php编程效率技巧
提高php编程效率技巧 投稿:mrr 字体:[增加 减小] 类型:转载 时间:2015-08-13 php是全球范围应用范围最广的开发语言,php和linux.apache.mysql紧密结合,形 ...
- DirectX 发展历程
在Windows下开发游戏,大家都会联想到DirectX.实际上,DirectX并不等同于游戏,它也不是写游戏程序的唯一选择.其实,DirectX只是提供了一种更直接的控制硬件的API库而已.当然,它 ...
- 纯CSS制作三角(转)
原原文地址:http://www.w3cplus.com/code/303.html 原文地址:http://blog.csdn.net/dyllove98/article/details/89670 ...
- PHP文件操作 之往一个文件写入数据
//打开一个文件 $f = fopen($filename,'wb'); $filename:打开一个文件,不存在则自动创建,如果不能创建,说明指定的文件目录有错误 wb:写入的方式 ---- 覆盖原 ...
- IMAP和POP3有什么区别
http://help.163.com/10/0203/13/5UJONJ4I00753VB8.html?servCode=6010237 IMAP和POP3有什么区别? POP3协议允许电子邮件 ...