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 ...
随机推荐
- 【GK101 谐波数据生成器】上位机软件升级(版本:1.1)
============================= 技术论坛:http://www.eeschool.org 博客地址:http://xiaomagee.cnblogs.com 官方网店:ht ...
- Scrum会议4
组名称:天天向上 项目名称:连连看 参会成员:王森(Master)张金生 张政 栾骄阳 时间:2016.10.19 已完成内容: 1.连连看生成一关功能. 2.目前测试发现没有问题. 计划完成: 1. ...
- 1. Programming in C is fun!
Programming in C is fun! #include <stdio.h> int main() { printf("Programming in C is fun! ...
- Javascript 笔记与总结(2-1)Javascript 与 DOM
浏览器有渲染 html 的功能,把 html 源码在内存里形成一个 DOM 对象,就是文档对象. 浏览器内部有一个 js 的解释器 / 执行器 / 引擎,如 Chrome 的 V8 引擎. 在 htm ...
- SQL--查询相同字段的数据
select city, statefrom state_county_citywhere city in (select city from state_county_city group by c ...
- mysql安装tcmalloc
TCMalloc(Thread-Caching Malloc)是google-perftools工具中的一个,与标准的glibc库的malloc相比,TCMalloc在内存的分配上效率和速度要高得多, ...
- kuaisupaixu
#include<stdio.h> void quiksort(int a[],int low,int high) { int i = low; int j = high; ...
- Java ArrayListSerialise
import java.io.*; import java.util.*; //ArrayListSerialise public class A { public static void main( ...
- Mongo简单查询总结
mongo 简单查询db.ansheng.findOne()//返回第一条匹配到的数据db.ansheng.findOne({"aaaaa":4})db.ansheng.find( ...
- gtd好文两篇收藏
http://www.jianshu.com/p/bf5e8a9761f5 http://blog.sina.com.cn/s/blog_4e0f66b80100m73i.html