调整了近一上午的模板

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模板的更多相关文章

  1. android ListView 九大重要属性详细分析、

    android ListView 九大重要属性详细分析. 1.android ListView 一些重要属性详解,兄弟朋友可以参考一下. 首先是stackFromBottom属性,这只该属性之后你做好 ...

  2. Android ListView onItemClick Not Work

    Android ListView onItemClick Not Work ListView item中有Button和RadioButton的时候,它的Item点击事件不起作用,需要设置item的属 ...

  3. 【腾讯Bugly干货分享】Android ListView与RecyclerView对比浅析--缓存机制

    本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/5811d3e3ab10c62013697408 作者:黄宁源 一,背景 Recy ...

  4. Android ListView 常用技巧

    Android ListView 常用技巧 Android TextView 常用技巧 1.使用ViewHolder提高效率 ViewHolder模式充分利用了ListView的视图缓存机制,避免了每 ...

  5. Android listview addHeaderView 和 addFooterView 详解

    addHeaderView()方法:主要是向listView的头部添加布局addFooterView()方法:主要是向listView的底部添加布局 需要注意的是添加布局的时候应该添加从父容器开始添加 ...

  6. Android ListView滑动过程中图片显示重复错乱闪烁问题解决

    最新内容建议直接访问原文:Android ListView滑动过程中图片显示重复错乱闪烁问题解决 主要分析Android ListView滚动过程中图片显示重复.错乱.闪烁的原因及解决方法,顺带提及L ...

  7. Android --ListView分页

    参考博客:Android ListView分页加载(服务端+android端)Demo 监听OnScrollListener事件 class OnListScrollListener implemen ...

  8. Android ListView ListActivity PreferenceActivity背景变黑的问题ZT

    Android ListView ListActivity PreferenceActivity背景变黑的问题 ListView在滚动时背景会变暗甚至变黑,这个要从Listview的效果说起,默认的L ...

  9. android listview去掉分割线

    1:android listview去掉分割线 1>设置android:divider="@null" 2>android:divider="#0000000 ...

随机推荐

  1. POJ 1988 Cube Stacking(带权并查集)

    Cube Stacking Time Limit: 2000MS   Memory Limit: 30000K Total Submissions: 23678   Accepted: 8299 Ca ...

  2. 让apache不区分图片和文件后缀大小写

    加载mod_speling模块: LoadModule speling_module /usr/lib/apache2/modules/mod_speling.so 开启模块: CheckSpelli ...

  3. maven相关概念

    1.maven仓库分为:本地仓库,远程仓库.远程仓库分为私服.中央仓储和其他公共库. 2.mvn clean install 部署到本地仓库 3.mvn clean deploy 部署到远程仓储 4. ...

  4. setInterval 启用和停止,见代码

    <title></title>    <script src="Scripts/jquery-1.4.1-vsdoc.js" type="t ...

  5. [kuangbin带你飞]专题八 生成树 - 次小生成树部分

    百度了好多自学到了次小生成树 理解后其实也很简单 求最小生成树的办法目前遇到了两种 1 prim 记录下两点之间连线中的最长段 F[i][k] 之后枚举两点 若两点之间存在没有在最小生成树中的边 那么 ...

  6. Apache Spark源码走读之11 -- sql的解析与执行

    欢迎转载,转载请注明出处,徽沪一郎. 概要 在即将发布的spark 1.0中有一个新增的功能,即对sql的支持,也就是说可以用sql来对数据进行查询,这对于DBA来说无疑是一大福音,因为以前的知识继续 ...

  7. PHP 开发 APP 接口 学习笔记与总结 - APP 接口实例 [6] 版本升级接口开发

    判定 app 是否需要加密:通过 app 表中的 status 字段来判定,加密的字符串为 app 表中的 key 字段. 在获取的客户端和服务器端(数据库表中相应字段)的版本号不一致时,返回 dat ...

  8. Android项目框架升级尝鲜OkHttp

    本文来自http://blog.csdn.net/liuxian13183/ ,引用必须注明出处! 随着项目日趋稳定,需求不再总是变化,那么是时间来整理下项目了.先简单介绍下,本项目最初使用loop4 ...

  9. iOS archive(归档)的总结 (序列化和反序列化,持久化到文件)

    http://www.cnblogs.com/ios8/p/ios-archive.html

  10. c# ToString() 用法

    string tempa = Convert.ToString(31, 2);//将10进制数31转换为2进制字符串. string strNums = int.Parse(tempa).ToStri ...