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 ...
随机推荐
- Leetcode | Work Break I & II
Work Break I Given a string s and a dictionary of words dict, determine if s can be segmented into a ...
- 【翻译】Kinect v2程序设计(C++-) AudioBeam篇
Kinect v2,Microphone Array可以用来对于水平面音源方向的推测(AudioBeam)和语音识别(Speech Recognition).这一节是介绍如何取得AudioBeam. ...
- 微信的User-Agent
Mozilla/5.0 (Linux; U; Android 5.0.2; zh-cn; MI 2C Build/LRX22G) AppleWebKit/533.1 (KHTML, like Geck ...
- Ubuntu+Nginx+PHP的最简搭建方法
先安装: sudo apt-get install nginx php5-fpm -y 然后编辑配置文件: /etc/nginx/site-available/default 找到"loca ...
- PHPStorm下XDebug配置
PHPStorm下XDebug配置 分类: PHP2013-08-11 22:15 19697人阅读 评论(0) 收藏 举报 目录(?)[+] 1安装Xdebug 用yum安装可能会失败,用p ...
- SHELL 中的重定向和管道
1. 什么叫重定向将输入或输出重新指定到别的位置. 2. 重定向输出2.1.命令执行数据流文件/设备---- 标准输入 -->命令 --- 标准输出 -->文件/设备 ...
- 20145235《Java程序设计》第7周学习总结
教材学习内容总结 13.1 认识时间与日期 格林威治时间(GMT):通过观察太阳而得,因为地球公转轨道为椭圆形且速度不一,本身自传减速而造成误差. 世界时(UT):通过观测远方星体跨过子午线而得,受地 ...
- laravel 视图组件
假设有一个文件被多个视图需要,比如导航条: 1.在路由文件添加 View::composer('stats', function($view){ $view->with('stats', app ...
- Siddhi CEP Window机制
https://docs.wso2.com/display/CEP400/SiddhiQL+Guide+3.0#SiddhiQLGuide3.0-Window https://docs.wso2.co ...
- Android 4.2蓝牙介绍
蓝牙一词源于公元十世纪丹麦国王HaraldBlatand名字中的Blatand.Blatand的英文之意就是Blue tooth.这是因为这位让丹麦人引以为傲的国王酷爱吃蓝莓以至于牙龈都被染成蓝色.由 ...