新建一个文件“practice1.xml”

编写代码如下:

  <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<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="wrap_content"
android:hint="Message"
android:layout_weight="1"
android:gravity="top|left"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/button"
android:text="Reset"
android:layout_weight="1"
android:textAllCaps="false"
android:textSize="20sp"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/button2"
android:text="Send"
android:layout_weight="1"
android:textAllCaps="false"
android:textSize="20sp"/>
</LinearLayout>
</LinearLayout>

运行模拟器效果如下图:

Android—常用组件练习的更多相关文章

  1. Android常用组件

    UI相关 图片 Android-Universal-Image-Loader:com.nostra13.universalimageloader:异步加载.缓存.显示图片 ImageLoader:co ...

  2. Android常用组件【转】

    UI相关 图片 Android-Universal-Image-Loader:com.nostra13.universalimageloader:异步加载.缓存.显示图片 ImageLoader:co ...

  3. Android常用组件Broadcast介绍

    一.Broadcast简介 Broadcast是Android的四大组件之一.可分为: 1.普通广播 发送一个广播,所有监听该广播的广播接收者都可以监听到改广播. 2.异步广播 当处理完之后的Inte ...

  4. Android常用组件之AutoCompleteTextView

    安卓组件中,凡是需要配置数据的组件,一般都是用Adapter配置. AutoCompleteTextView的使用方法与ListView类似,也是用setAdapter来设置数据. MultiAuto ...

  5. Android常用组件之ListView

    使用ListAdapter是ListView的适配器. 使用ListView.setAdapter()方法来设置ListView的适配器. 简单的使用 adapter = new ArrayAdapt ...

  6. Android 高级UI设计笔记08:Android开发者常用的7款Android UI组件(转载)

    Android开发是目前最热门的移动开发技术之一,随着开发者的不断努力和Android社区的进步,Android开发技术已经日趋成熟,当然,在Android开源社区中也涌现了很多不错的开源UI项目,它 ...

  7. android开发常用组件【持续更新中。。。】

    UI相关 图片 Android-Universal-Image-Loader:com.nostra13.universalimageloader:异步加载.缓存.显示图片 ImageLoader:co ...

  8. React Native常用组件在Android和IOS上的不同

    React Native常用组件在Android和IOS上的不同 一.Text组件在两个平台上的不同表现 1.1 height与fontSize 1.1.1只指定font,不指定height 在这种情 ...

  9. Android业务组件化之子模块SubModule的拆分以及它们之间的路由Router实现

    前言: 前面分析了APP的现状以及业务组件化的一些探讨(Android业务组件化之现状分析与探讨),以及通信的桥梁Scheme的使用(Android业务组件化之URL Scheme使用),今天重点来聊 ...

随机推荐

  1. LIS-Program E

    最大上升子序列 Description The world financial crisis is quite a subject. Some people are more relaxed whil ...

  2. 读者写者问题(有bug 后续更改)

    与上一篇<秒杀多线程第十篇 生产者消费者问题>的生产者消费者问题一样,读者写者也是一个非常著名的同步问题.读者写者问题描述非常简单,有一个写者很多读者,多个读者可以同时读文件,但写者在写文 ...

  3. hdu 1031 (partial sort problem, nth_element, stable_partition, lambda expression) 分类: hdoj 2015-06-15 17:47 26人阅读 评论(0) 收藏

    partial sort. first use std::nth_element to find pivot, then use std::stable_partition with the pivo ...

  4. iphone获取当前流量信息

    通过读取系统网络接口信息,获取当前iphone设备的流量相关信息,统计的是上次开机至今的流量信息. 代码 悦德财富:https://yuedecaifu.com 1 2 3 4 5 6 7 8 9 1 ...

  5. MyEclipse 安装目录下找不到Common目录

    最近在安装了MyEclipse,由于是自己指定的安装目录,在成功安装后要破解的时候却发现找不到安装目录下的Common目录,很是郁闷,后来发现如下: MyEclipse启动后的上方导航中找到MyEcl ...

  6. 使用iskindofclass来发现对象是否是某类或其子类的实例

    发现对象是否是特定类或其子类的实例 要发现对象是否是某类或其子类的实例,请在对象上调用 isKindOfClass: 方法.当应用程序需要发现其响应的消息(实现的或继承的),它有时进行以上的检查. s ...

  7. 爆破unabexcm5fl(已补上注册机)

    系统 : Windows xp 程序 : unabexcm5fl 程序下载地址 :http://pan.baidu.com/s/1pJYaNUV 要求 : 爆破 使用工具 :OD 可在“PEDIY C ...

  8. array_intersect() php筛选两个数组共有的元素

    我们已经讲过如何筛选出连个数组中不共有的元素,今天就来看看php如何筛选出两个数组中共有的元素,例如筛选$array1和$array2共有的元素. 函数名:array_intersect(): 调用方 ...

  9. this的指向及应用

    this的指向: //this 指的是调用 当前方法 (函数) 的那个对象 function fn1(){ this; } //fn1(); this => window //obj.oncli ...

  10. flex+java实现文件的上传

    flex前端代码: <?xml version="1.0" encoding="utf-8"?><s:BorderContainer xmln ...