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 ...
随机推荐
- Phaser中很多对象都有一个anchor属性
游戏要用到的一些图片.声音等资源都需要提前加载,有时候如果资源很多,就有必要做一个资源加载进度的页面,提高用户等待的耐心.这里我们用一个state来实现它,命名为preload. 因为资源加载进度条需 ...
- Geronimo应用服务器和MySQL数据库服务器
就是Web 2.0的全部,尽管该术语出现才几乎一年的时间,但现在好像只有烹饪杂志还没有加入到讨论Web 2.0未来出路的行列中.自从出现了里程碑式的文章"What Is Web 2.0:De ...
- 为什么java里用常量赋值就相等,用字符串就不等?
例一: String s0="HF"; String s1=new String("HF"); System.out.println(s0==s1); 输入为什 ...
- 3. PHP
安装: apt-get install php5-fpm php5-mysql 配置: vi /etc/php5/fpm/php.ini cgi.fix_pathinfo=0 vi /etc/ ...
- JSP编程-步步为营
[第一个JSP举例] header.jsp <%@ page language="java" contentType="text/html; charset=utf ...
- Eclipse报错:java.lang.ClassNotFoundException: ContextLoaderListener
Eclipse中tomcat部署工程启动后报错: 严重: Error configuring application listener of class org.springframework.web ...
- eXosip2代码分析
主要类型定义: 1.struct eXtl_protocol struct eXtl_protocol { int enabled; int proto_port; ]; ]; int proto_n ...
- 每天学点GDB 12
本文介绍在archlinux环境下,如何进行内核使用gdb配合qemu进行调试. 1. 安装qemu 2. 编译linux kernel 选择最新的内核版本,规避gcc编译出错的问题具体步骤如 ...
- 关于DWZ模板中全选的使用
只在使用DWZ框架时有用 模板中 <input type="checkbox" name="rule_id[]" />选项1 <input t ...
- C++的函数名重载
#include <iostream> using namespace std; int func(int c) { cout<<"int func(int c)&q ...