在项目中有用到需要将一个按钮放到按钮的下方,如果在绝对坐标的情况下,可以直接放入坐标的,但是在相对坐标的情况下无法写入坐标,我知道该用相对位置来实现,不知道该怎样布局,请各位高手指点啊!
解决方案 »
- 问下 user tags和下面的这个错误
- 怎样在 指定的日子 运行1个程序
- 要写一个短消息界面 想参考下安桌自带短信界面 相关源码怎么获取?
- android安装APK的时候能顺便把图片复制到SD卡么??
- android可以实现屏幕保护的设置吗?
- Android中InflaterInputStream能否解压zlib的压缩文档
- MTK6589去除google search bar后客制化
- android:sharedUserId导致不能覆盖安装
- 跳转每个activity之前检测是否登录
- android开发,播放手机上音频,播放不了,求大神指点谢谢~
- 系统颜色android secondary_text_dark在哪
- 如何调用Android中文手写识别引擎?跪求指导,高手请进~~
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button1"/>
</RelativeLayout>
<!--
整个应用的默认布局框架
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayoutPage" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@drawable/background"
>
<Button android:id="@+id/btn1"
android:textColor="#ffffff"
android:textSize="13sp"
android:text="基本点"
android:layout_centerInParent="true"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></Button>
<Button android:id="@+id/btn2"
android:textColor="#ffffff"
android:textSize="13sp"
android:text="下面的"
android:layout_below="@id/btn1"
android:layout_alignLeft="@id/btn1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></Button>
<Button android:id="@+id/btn2"
android:textColor="#ffffff"
android:textSize="13sp"
android:text="上面的"
android:layout_alignLeft="@id/btn1"
android:layout_above="@id/btn1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></Button>
<Button android:id="@+id/btn3"
android:textColor="#ffffff"
android:textSize="13sp"
android:text="右边的"
android:layout_toRightOf="@id/btn1"
android:layout_alignTop="@id/btn1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></Button>
<Button android:id="@+id/btn3"
android:textColor="#ffffff"
android:textSize="13sp"
android:text="左边的"
android:layout_toLeftOf="@id/btn1"
android:layout_alignTop="@id/btn1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></Button>
</RelativeLayout>
能想到问,不会先搜一下啊..
csdn上搜一下,大把的示例啊
属性什么的自己试试就知道了 比提问快多了百度,google更多