<?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="vertical"
    android:background="@drawable/wall_paper" >
    <RelativeLayout
        android:id="@+id/title_bar"
        style="@style/TopBar" >

        <ImageView
            android:id="@+id/left_corner"
            android:layout_width="44dip"
            android:layout_height="fill_parent"
            android:scaleType="fitXY"
            android:src="@drawable/totem_upper_right" />

        <!-- 标题 -->
        <TextView
            android:id="@+id/title_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:textColor="#ffffff"
            android:textSize="@dimen/activity_title_andbottom_button_text_size"
            android:textStyle="bold" />

        <ImageView
            android:id="@+id/right_corner"
            android:layout_width="44dip"
            android:layout_height="fill_parent"
            android:scaleType="fitXY"
            android:layout_alignParentRight="true"
            android:src="@drawable/totem_upper_left" />
        <ImageButton
            android:id="@+id/call"
            android:layout_width="35dip"
            android:layout_height="35dip"
            android:layout_centerVertical="true"
            android:layout_marginRight="7dip"
            android:layout_toLeftOf="@id/right_corner"
            android:background="@drawable/imb_msg_call_style" />
    </RelativeLayout>
    <ListView
        android:id="@+id/message_list"
        android:layout_width="fill_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        android:cacheColorHint="@android:color/transparent"
        android:divider="@null"
        android:fadingEdge="none"
        android:fastScrollEnabled="true"
        android:listSelector="@android:color/transparent"
        android:scrollbars="none"
        android:stackFromBottom="true" >
    </ListView>

    <LinearLayout
        android:id="@+id/layout_editor"
        android:paddingLeft="10dip"
        android:paddingRight="10dip"
        android:paddingTop="5dip"
        android:paddingBottom="5dip"
        android:layout_margin="0dip"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@color/gray3"
        android:orientation="horizontal" >

        <EditText
            android:id="@+id/edit_msg"
            android:textSize="16dip"
            android:maxLines="10"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginRight="5dp"
            android:background="@drawable/sms_text_input"
            android:focusable="true"
            android:focusableInTouchMode="true" />

        <Button
            android:id="@+id/send_msg"
            android:text="发送"
            android:textColor="#FFFFFF"
            android:textSize="18dip"
            android:textStyle="bold"
            android:gravity="center"
            android:padding="5dip"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:background="@drawable/sms_send_button"/>
    </LinearLayout>
</LinearLayout>

----

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/wall_paper" >
    <RelativeLayout
        android:id="@+id/title_bar"
        style="@style/TopBar" >

        <ImageView
            android:id="@+id/left_corner"
            android:layout_width="44dip"
            android:layout_height="fill_parent"
            android:scaleType="fitXY"
            android:src="@drawable/totem_upper_right" />

        <!-- 标题 -->
        <TextView
            android:id="@+id/title_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:textColor="#ffffff"
            android:textSize="@dimen/activity_title_andbottom_button_text_size"
            android:textStyle="bold" />

        <ImageView
            android:id="@+id/right_corner"
            android:layout_width="44dip"
            android:layout_height="fill_parent"
            android:scaleType="fitXY"
            android:layout_alignParentRight="true"
            android:src="@drawable/totem_upper_left" />
        <!-- 创建信息按钮 -->
        <ImageButton
            android:id="@+id/call"
            android:layout_width="35dip"
            android:layout_height="35dip"
            android:layout_centerVertical="true"
            android:layout_marginRight="7dip"
            android:layout_toLeftOf="@id/right_corner"
            android:background="@drawable/imb_msg_call_style" />
    </RelativeLayout>

    <LinearLayout
        android:id="@+id/layout_editor"
        android:paddingLeft="10dip"
        android:paddingRight="10dip"
        android:paddingTop="5dip"
        android:paddingBottom="5dip"
        android:layout_margin="0dip"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@color/gray3"
        android:orientation="horizontal" >

        <EditText
            android:id="@+id/edit_msg"
            android:textSize="16dip"
            android:maxLines="10"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginRight="5dp"
            android:background="@drawable/sms_text_input"
            android:focusable="true"
            android:focusableInTouchMode="true" />

        <Button
            android:id="@+id/send_msg"
            android:text="发送"
            android:textColor="#FFFFFF"
            android:textSize="18dip"
            android:textStyle="bold"
            android:gravity="center"
            android:padding="5dip"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:background="@drawable/sms_send_button"/>
    </LinearLayout>

    <ListView
        android:id="@+id/message_list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_above="@id/layout_editor"
        android:layout_below="@id/title_bar"
        android:cacheColorHint="@android:color/transparent"
        android:divider="@null"
        android:fadingEdge="none"
        android:fastScrollEnabled="true"
        android:listSelector="@android:color/transparent"
        android:scrollbars="none"
        android:stackFromBottom="true" >
    </ListView>
</RelativeLayout>

比较MessageListActivity使用不同的layout的更多相关文章

  1. adjustResize和adjustPan的比较

    在下面的描述中,编辑框的maxLine都设定为10. 在信息列表界面中,编辑框在RelativeLayout中定义.编辑框上边(above)的列表组件的高度不会缩小为0,导致显示出现一点问题. 当信息 ...

  2. 前端框架 EasyUI (2)页面布局 Layout

    在 Web 程序中,页面布局对应用程序的用户体验至关重要. 在一般的信息管理类的 Web 应用程序中,页面结构通常有一个主工作区,然后在工作区上下左右靠近边界的区域设置一些边栏,用于显示信息或放置一些 ...

  3. Android Studio分类整理res/Layout中的布局文件(创建子目录)

    res/layout中的布局文件太杂,没有层次感,受不了的我治好想办法解决这个问题. 前几天看博客说可以使用插件分组,可惜我没找到.知道看到另一篇博客时,才知道这个方法不能用了. 不能用插件,那就手动 ...

  4. 如何在ASP.NET Web站点中统一页面布局[Creating a Consistent Layout in ASP.NET Web Pages(Razor) Sites]

    如何在ASP.NET Web站点中统一页面布局[Creating a Consistent Layout in ASP.NET Web Pages(Razor) Sites] 一.布局页面介绍[Abo ...

  5. [Android]异步 layout inflation(翻译)

    以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/5829809.html 异步 layout inflation ...

  6. Express 4 handlebars 不使用layout写法

    Express 4 handlebars 不使用layout写法 Express node nodejs handlebars layout 最近刚开始学习使用nodejs. 使用express搭建了 ...

  7. Android在layout xml中使用include

    Android include与merge标签使用详解 - shuqiaoniu的博客 - 博客频道 - CSDN.NEThttp://blog.csdn.net/shuqiaoniu/article ...

  8. Duilib源码分析(五)UI布局—Layout与各子控件

    接下来,继续分析duilib之UI布局Layout,目前提供的布局有:VerticalLayout.HorizontalLayout.TileLayout.TabLayout.ChildLayout分 ...

  9. compass reset和layout [Sass和compass学习笔记]

    reset 可以重置浏览器的的html的默认样式,因为各个浏览器对有些元素解析差别很大 通过重置样式可以让样式的浏览器兼容 更简单 使用方法简单 @import "compass/reset ...

随机推荐

  1. OpenCV学习记录之摄像头调用

    关于opencv调用摄像头的问题主要是因为摄像头的打开有延时.在显示图像前,要用if语句判断图像是否存在.(否则会报错) 具体的:教程里的源程序,将if条件句里,break去掉,并增加else语句. ...

  2. w​i​n​d​o​w​s​ ​s​e​r​v​e​r​ ​2​0​0​8​ ​r​2​ ​启​用​索​引(转)

    08r2的“windows search”服务默认是不安装的,要想启用索引执行下列步骤:        1.打开“服务器管理”——选中“角色”——右边选中“添加角色”——勾选“文件服务”.    2. ...

  3. JavaScript-undefined与null区别

    JavaScript中的null在其他编程语言中也很常见,但是JavaScript在设计的过程中null自动转换为0,为了更好表示空,这个时候undefined出现了,null通过typeof结果是“ ...

  4. LDA(latent dirichlet allocation)的应用

    http://www.52ml.net/1917.html 主题模型LDA(latent dirichlet allocation)的应用还是很广泛的,之前我自己在检索.图像分类.文本分类.用户评论的 ...

  5. CRF分词的纯Java实现

    与基于隐马尔可夫模型的最短路径分词.N-最短路径分词相比,基于随机条件场(CRF)的分词对未登录词有更好的支持.本文(HanLP)使用纯Java实现CRF模型的读取与维特比后向解码,内部特征函数采用  ...

  6. Java 解决 servlet 接收参数中文乱码问题

    方法一: 接收到的参数进行如下操作[不建议]: String tmp = new String(type.getBytes("iso-8859-1"), "utf-8&q ...

  7. 前端笔记----jquery入门知识点总结 (转)

    http://www.cnblogs.com/cwp-bg/p/7633623.html 一.jquery的加载方法 $(document).ready(function(){js代码}); $(fu ...

  8. 使用nginx反向代理到不同服务器(共享同一端口)配置文件

    使用nginx反向代理到不同服务器(共享同一端口)配置文件 https://blog.csdn.net/wang_k_123/article/details/72779443 https://www. ...

  9. Python防止sql注入

    看了网上文章,说的都挺好的,给cursor.execute传递格式串和参数,就能防止注入,但是我写了代码,却死活跑不通,怀疑自己用了一个假的python 最后,发现原因可能是不同的数据库,对于字符串的 ...

  10. JavaScript代码不执行

    一天先后有两个同事问我为啥他的js代码出现了莫名其妙的问题 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "h ...