Android布局控件

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center_vertical"
> <ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/qq_image" /> <CheckBox
android:id="@+id/checkBox1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CheckBox" /> <EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="EditText"
android:ems="10" > <requestFocus />
</EditText> <AutoCompleteTextView
android:id="@+id/autoCompleteTextView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:completionThreshold="2"
android:hint="@string/editText1_name" >
</AutoCompleteTextView> <MultiAutoCompleteTextView
android:id="@+id/multiAutoCompleteTextView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:completionThreshold="2"
android:hint="@string/editText2_name" >
</MultiAutoCompleteTextView> <Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#C0D9D9"
android:text="Button" /> <com.example.anroiddome.MyTextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:singleLine="true"
android:text="@string/view_name" /> <ToggleButton
android:id="@+id/toggleButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="false"
android:textOff="关(toggleButton)"
android:textOn="开(toggleButton)" /> <RadioGroup
android:id="@+id/radioGroup1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
> <RadioButton
android:id="@+id/radio0"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="男" /> <RadioButton
android:id="@+id/radio1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:text="女" />
</RadioGroup> </LinearLayout>
整理于http://naotu.baidu.com/file/e5880b84b1a906838116f7a45f58de78
Android布局控件的更多相关文章
- Mono for Android布局控件属性小结
1. layout_weight 用于给一个线性布局中的诸多视图的重要度赋值. 所有的视图都有一个layout_weight值,默认为零,意思是需要显示 多大的视图就占据多大的屏幕空 间.若赋一个高于 ...
- Android 布局控件——滚动条视图,日期,时间
今天学长讲了一些控件,比较强的那种控件. 刚开始讲了图片,但是图片我前面写过了就跳过. 滚动条牛牛们应该很熟悉,也常用哈. 这是垂直的滚动条视图哈 一起来用吧! <ScrollView andr ...
- Android:控件布局(相对布局)RelativeLayout
RelativeLayout是相对布局控件:以控件之间相对位置或相对父容器位置进行排列. 相对布局常用属性: 子类控件相对子类控件:值是另外一个控件的id android:layout_above-- ...
- Android:控件布局(线性布局)LinearLayout
LinearLayout是线性布局控件:要么横向排布,要么竖向排布 决定性属性:必须有的! android:orientation:vertical (垂直方向) .horizontal(水平方向) ...
- 【Android】7.1 布局控件常用的公共属性
分类:C#.Android.VS2015: 创建日期:2016-02-10 一.简介 Android应用程序中的布局控件都是容器控件,用于控制子元素的排列和放置方式.Android提供的布局控件有: ...
- Android:控件布局(相对布局)RelativeLayout(转)
相对布局常用属性: 子类控件相对子类控件:值是另外一个控件的id android:layout_above----------位于给定DI控件之上android:layout_below ------ ...
- Android之控件使用
Android系统为我们提供了大量的控件,例如:开关控件.单选按钮.多选按钮.单选菜单等等,那么这些控件如何使用呢?本篇我将带领大家一道学习一下如何使用这些控件.所谓无图无真相,先让大家看一下效果图: ...
- android 基础控件(EditView、SeekBar等)的属性及使用方法
android提供了大量的UI控件,本文将介绍TextView.ImageView.Button.EditView.ProgressBar.SeekBar.ScrollView.WebView ...
- Android基本控件之Menus
在我们的手机中有很多样式的菜单,比如:我们的短信界面,每条短信,我们长按都会出现一个菜单,还有很多的种类.那么现在,我们就来详细的讨论一下安卓中的菜单 Android的控件中就有这么一个,叫做Menu ...
随机推荐
- Java IO4:字符流进阶及BufferedWriter、BufferedReader
字符流和字节流的区别 拿一下上一篇文章的例子: 1 public static void main(String[] args) throws Exception 2 { 3 File file = ...
- Ubuntu14.04上安装tftpd服务
首先sudo apt-get install tftpd-hpa, tftp-hpa 然后sudo vim /etc/default/tftpd-hpa 配置文件如下 TFTP_USERNAME=& ...
- 轻量级jquery框架之--面板(panel)
面板需求: (1)支持可拖拽,面板将作为后期的布局组件.window组件.alert组件的基础. (2)支持自定义工具栏,工具栏位置定义在面板底部,工具栏依赖toolbar组件. (3)支持加载JSO ...
- Log4Net 的简要配置
引用log4net.dll AssemblyInfo.cs中 [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyF ...
- XML的特殊字符
XML中共有5个特殊的字符,分别是:&<>“’.如果配置文件中的注入值包括这些特殊字符,就需要进行特别处理.有两种解决方法: 其一,采用本例中的<![CDATA[ ]]> ...
- tuple只有一个元素的时候,必须要加逗号
In [1]: a = (1) In [2]: a Out[2]: 1 In [3]: a = (1,) In [4]: a Out[4]: (1,) 这是因为括号()既可以表示tuple,又可以表示 ...
- CSS3之背景色渐变
在css2时代,页面背景色渐变,按钮背景渐变效果主要是通过图片实现,css3中可通过 gradient 实现背景色渐变,图片作为一种资源,每次在页面加载时都要从服务器下载,这样如果页面很大需要渐变的效 ...
- firefox因gnash cpu 高
sudo apt-get remove --purge gnash 去adobe下载adobe flash for linux 解压 tar zxvf install_flash_player_11_ ...
- Effective Java设定游戏 - 就是爱Java
首先,我们先设定游戏,一个网页游戏的基本场景,主角拥有各种能力,但一开始数值都只有系统初始,随着故事的发展,会接触到各种不同的场景,获得提升角色的道具与装备,来参与更高难度的任务. 阅读全文>& ...
- 子shell的$$
http://blog.csdn.net/firefoxbug/article/details/7426109