LinearLayout练习
<?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练习的更多相关文章
- Android中的LinearLayout布局
LinearLayout : 线性布局 在一般情况下,当有很多控件需要在一个界面列出来时,我们就可以使用线性布局(LinearLayout)了, 线性布局是按照垂直方向(vertical)或水平方向 ...
- 和我一起看API(一)你所不知道的LinearLayout补充
楼主英语水平差,翻译的不好的话请多多指正,嘿嘿... A Layout that arranges its children in a single column or a single row. T ...
- Android-RelativeLayout(相对布局)、LinearLayout(线性布局)
RelativeLayout(相对布局):按照各子元素之间的位置关系完成布局. 定位:android:layout_above="@id/xxx" --将控件置于给定ID控件之上 ...
- LinearLayout布局问题
LinearLayout是平时开发中很常见的线性布局方式,分为水平和竖直2种,笔者在实际使用中发现了如下问题,希望能帮到别人. 横着的LinearLayout,凡是设置x坐标的属性都不起作用,比如la ...
- 动态添加LinearLayout的高度
WindowManager wm = (WindowManager) getContext() .getSystemService(Context.WINDOW_SERVICE); int width ...
- 动态生成linearLayout
LinearLayout linearLayout=new LinearLayout(this); linearLayout.setOrientation(LinearLayout.VERTICAL) ...
- Android的学习第六章(布局一LinearLayout)
今天我们来说一下Android五大布局-LinearLayout布局(线性布局) 含义:线性布局,顾名思义,指的是整个Android布局中的控件摆放方式是以线性的方式摆放的, 主要作用:主要对整个界面 ...
- This TableLayout layout or its LinearLayout parent is possibly useless
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...
- Record:Handle onClick for our custom LinearLayout for Gallery-like HorizontalScrollView
Handle onClick for our custom LinearLayout for Gallery-like HorizontalScrollView The post "Im ...
- Andriod中textview垂直水平居中及LinearLayout内组件的垂直布局
1.textview 垂直水平居中的设置 Android:gravity="center_vertical|center" 2.LinearLayout中设置控件垂直布局,默认的是 ...
随机推荐
- HTML5探索之datalist研究
最近一个项目需要用到类似淘宝,百度搜索时的自动检索方案.自然想到了使用datalist标签.但是遇到一个bug,经过两天研究.小有结果给大家分享下~~ 首先看bug吧!~ 因为项目最开始测试就是用36 ...
- linux终端下 编译c语言程序
linux终端下,编译C语言程序步骤为: 采用vi进行源代码编写,编写完成后,:wq存盘退出,如: vi test.c 在命令行下,运行gcc编译程序,生成执行码,如: gcc -o test te ...
- 【Todo】Nginx架构学习
要进行Web服务,绕不开的就是Nginx.这已经是大型网站的标配.对Nginx进行一定程度的深入学习. http://www.ituring.com.cn/article/4436 http://bl ...
- @synchronized (object)使用详解
synchronized关键字代表这个方法加锁,相当于不管哪一个线 程A每次运行到这个法时,都要检查有没有其它正在用这个方法的线程B(或者C D等),有的话要等正在使用这个方法的线程B(或者C D)运 ...
- hdu 4288 Coder
线段树好题,和 15 年的广东省省赛 C 题有相似之处,一开始我的思路有偏差,看了别人的博客后感觉处处技巧都是精华,主要是区间合并的技巧一时很难想到,先附上代码: #include<cstdio ...
- 【linux 命令】:查看系统开机,关机时间【转载】
转载原文:http://www.cnblogs.com/kerrycode/p/3759395.html 看Linux开机关机时间的方法(非常全面) 1: who 命令查看 who -b 查看最后一次 ...
- 转!!MYSQL数据类型
这篇文章主要介绍了MySQL数据类型和常用字段属性总结,本文总结了日期和时间数据类型.数值数据类型.字符串数据类型等,需要的朋友可以参考下 前言 好比C++中,定义int类型需要多少字节,定义 ...
- OA系统部门结构树
public class DepartmentUtils { /** * @param topList 顶级部门列表 * @param removeId 删除部门的id * @return */ pu ...
- 在centos6.5中安装reids
一.简介 Redis是一个key-value存储系统,是一个内存数据库,Redis的出现,很大程度补偿了memcached这类key/value存储的不足,在部 分场合可以对关系数据库起到很好的补充作 ...
- 【bzoj1057】棋盘制作
题意 给定\(n*m\)的棋盘,每个格子有0或1其中的一种颜色. 求一个最大的正方形,满足正方形内0和1相互间隔. 求一个最大的矩形,满足矩形内0和1相互间隔. \(n,m\leq 2000\) 分析 ...