<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"> <EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="To"
/> <EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Subject"/> <EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Message"
android:gravity="top"
android:layout_weight="1"/> <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="260dp"
android:layout_height="wrap_content"
android:text="确定"
android:layout_weight="1"
/>
<Button
android:layout_width="260dp"
android:layout_height="wrap_content"
android:text="取消"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>

LinearLayout练习的更多相关文章

  1. Android中的LinearLayout布局

    LinearLayout : 线性布局 在一般情况下,当有很多控件需要在一个界面列出来时,我们就可以使用线性布局(LinearLayout)了,  线性布局是按照垂直方向(vertical)或水平方向 ...

  2. 和我一起看API(一)你所不知道的LinearLayout补充

    楼主英语水平差,翻译的不好的话请多多指正,嘿嘿... A Layout that arranges its children in a single column or a single row. T ...

  3. Android-RelativeLayout(相对布局)、LinearLayout(线性布局)

    RelativeLayout(相对布局):按照各子元素之间的位置关系完成布局. 定位:android:layout_above="@id/xxx" --将控件置于给定ID控件之上 ...

  4. LinearLayout布局问题

    LinearLayout是平时开发中很常见的线性布局方式,分为水平和竖直2种,笔者在实际使用中发现了如下问题,希望能帮到别人. 横着的LinearLayout,凡是设置x坐标的属性都不起作用,比如la ...

  5. 动态添加LinearLayout的高度

    WindowManager wm = (WindowManager) getContext() .getSystemService(Context.WINDOW_SERVICE); int width ...

  6. 动态生成linearLayout

    LinearLayout linearLayout=new LinearLayout(this); linearLayout.setOrientation(LinearLayout.VERTICAL) ...

  7. Android的学习第六章(布局一LinearLayout)

    今天我们来说一下Android五大布局-LinearLayout布局(线性布局) 含义:线性布局,顾名思义,指的是整个Android布局中的控件摆放方式是以线性的方式摆放的, 主要作用:主要对整个界面 ...

  8. This TableLayout layout or its LinearLayout parent is possibly useless

    <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...

  9. Record:Handle onClick for our custom LinearLayout for Gallery-like HorizontalScrollView

    Handle onClick for our custom LinearLayout for Gallery-like HorizontalScrollView   The post "Im ...

  10. Andriod中textview垂直水平居中及LinearLayout内组件的垂直布局

    1.textview 垂直水平居中的设置 Android:gravity="center_vertical|center" 2.LinearLayout中设置控件垂直布局,默认的是 ...

随机推荐

  1. c++ vector 简单实现。

    第二次修改: 1)熟悉基本的模板编程,头文件和定义必须放到一起. 2)熟悉内存管理模板类 allocator<T>. 1.使用标准库的内存管理类 allocator<T> 代替 ...

  2. HDU1542矩形面积并

    取出纵向边按x坐标排序,在y方向上建立线段树. 每次查询当前有效长度len,ans += len*(x[i]-x[i-1]); 其中len为T[rt].len; 查询完毕后更新y方向上线段树,入边+1 ...

  3. bootstrap 图片轮播效果

    <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="http: ...

  4. 国内外常用的DNS服务器

    国内外常用的DNS服务器 DNS,全称Domain Name System,即域名解析系统,帮助用户在互联网上寻找路径,它在互联网的作用是把域名转换成为网络可以识别的IP地址. 国外DNS服务器地址: ...

  5. Android最佳性能实践(一)——合理管理内存

    有不少朋友都问过我,怎样才能写出高性能的应用程序,如何避免程序出现OOM,或者当程序内存占用过高的时候该怎么样去排查.确实,一个优秀的应用程序,不仅仅要功能完成得好,性能问题也应该处理得恰到好处.为此 ...

  6. Mac 实用工具与问题解决

    1.在dock上方的一长溜,被我拖成个方块了 删掉里面的字符,然后按esc 即可! 2.FIT输入法(Fun Input Toy),是苹果操作系统OS X上的免费中文输入法,支持全拼/双拼/全双混拼, ...

  7. 原创: 开题报告中摘要部分快速将一段文字插入到word的表格中

    开题报告的摘要是表格形式,之前需要一个一个字的敲入,十分不方便修改. 所以百度了一下方法.现总结如下: 达到的效果 1 将这段文字复制粘贴到word中,在word文件中的每一个字与字之间插入空格.如何 ...

  8. 数据字典 dba_free_space及相对文件号RELATIVE_FNO 小结

    1.1 dba_free_space 1.1.1 概述 SQL> desc dba_free_space; Name Type Nullable Default Comments ------- ...

  9. hdu_3555 bomb

    数位动态规划     数位动态规划是求解一个大区间[L, R]中间满足条件Q的所有数字的个数(或者和,或其他)的一种方法.它通过分析每一位上的数字,一般用 dp[len][digit][...] 来表 ...

  10. Python类属性详解

    在python开发中,我们常常用到python的类,今天就通过实例和大家扒一扒类的属性,一起来看看吧. 类属性 1.类定义后就存在,而且不需要实例化 2.类属性使得相同类的不同实例共同持有相同变量 类 ...