Android 简单 相对布局的实现;
2017-07-16 23:50
337 查看
//代码中所有的按钮都是用的图片填充模式 ,全是个人的见解 如有不好的地方还玩各位老大给予改正 本人只是初学者
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/beijing"
>
<Button
android:id="@+id/buttonsoftware1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/tu1"
android:layout_centerInParent="true"
/>
<Button
android:id="@+id/buttonapply"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/tu3"
android:layout_centerHorizontal="true"
android:layout_above="@id/buttonsoftware1"
android:layout_alignRight="@id/buttonsoftware1"
/>
<Button
android:id="@+id/buttondeal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/tu2"
android:layout_centerHorizontal="true"
android:layout_below="@id/buttonsoftware1"
android:layout_alignLeft="@id/buttonsoftware1"
/>
<Button
android:id="@+id/buttonregarding"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/tu4"
android:layout_toRightOf="@+id/buttonsoftware1"
android:layout_alignTop="@+id/buttonsoftware1"
/>
<Button
android:id="@+id/buttonqita"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/tu5"
android:layout_toLeftOf="@+id/buttonsoftware1"
android:layout_alignTop="@+id/buttonsoftware1"
/>
</RelativeLayout>
相关文章推荐
- Android相对布局实现各种梅花效果
- android相对布局实现梅花效果
- Android相对布局实现各种梅花效果
- Android 相对布局 简单编程
- android RecyclerView 简单实现横竖布局穿插
- Android Layout 之 RelativeLayout,代码实现相对布局&android的button设置透明
- Android Layout 之 RelativeLayout,代码实现相对布局
- Android自定义ViewGroup:实现简单的垂直方向线性布局(2)
- 用Android布局和简单控件实现的一个常见的界面
- android 较高版本,页面分割线实现LinearLayoutCompat布局简单事例
- Android RecyclerView加载不同布局简单实现
- Android Toast带图标水平布局的简单实现
- Android --中间突出的底部导航栏布局简单实现
- Android卡片式布局的简单实现方法
- Android相对布局实现各种梅花效果
- Android手机开发 使用线性布局和相对布局实现Button垂直水平居中
- Android开发学习之卡片式布局的简单实现
- Android简单实现仿支付宝新年红包活动页面的动态布局效果
- Android Layout 之 RelativeLayout,代码实现相对布局
- Android开发学习之卡片式布局的简单实现