<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:name="@+id/label"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/mobile" />
<EditText
android:name="@+id/text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="phone"
android:layout_below="@id/label"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/text"
android:text="@string/button" />
</RelativeLayout>
为什么三个控件还是重叠到一起了啊Android布局控件
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:name="@+id/label"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/mobile" />
<EditText
android:name="@+id/text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="phone"
android:layout_below="@id/label"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/text"
android:text="@string/button" />
</RelativeLayout>
为什么三个控件还是重叠到一起了啊Android布局控件
解决方案 »
- 有没有人遇见过setVisibility(View.GONE) 不起作用?
- 发现一个叫黑马程序员的训练营 说是免费学3G开发 现在的培训机构真疯狂 标题一定要长~~~~~~~~~~~
- tabhost 设置高度问题
- 使用XMPP协议连接服务器时,总是报错,错误代码如下:
- 关于webview加载网页后cpu占用率高的问题,急求!
- 如何在相机预览界面添加按钮
- 关于android环境搭建问题,请教android开发高手
- 自定义view不显示,跪求答案
- android 系统的defaults.xml在哪
- webview实现文件下载
- 两个按钮,如何靠中显示?
- 想问一下,eclipse代码编辑器中怎么返回到上一步
每个子控件都需要设置其相对的位置
控件都从左上角开始排