<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布局控件
解决方案 »
- android做背单词软件该如何存储单词
- Android开发中能否向SD卡中导入中文文件名的文件?
- android gridView或listView拖拽
- 如何运行adb命令
- ViewPager不支持1.6版本 这个问题怎么解决 ?
- 求android桌面效果实现思路。
- 请教对话框:点击对话框意外的区域,对话框消失
- 我要实现一个程序(A)启动 另外一个程序(B),在b程序里触发事件让B进入后台,再次显示回A(a不要执行oncreate方法 ),然后a在唤醒b,b不要执行on
- Android项目连接服务器异常
- win7环境搭建Andriod ADT 22.6.2,layout出不来
- 两个按钮,如何靠中显示?
- 想问一下,eclipse代码编辑器中怎么返回到上一步
每个子控件都需要设置其相对的位置
控件都从左上角开始排