Android梅花布局,遥控器布局
16lz
2021-01-23
Android梅花布局,遥控器布局,这种就不需要去github找了吧,很基础的,不做github 的搬运工!
上图:
<?xmlversion="1.0"encoding="utf-8"?><RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"android:gravity="center"android:paddingTop="0dp"><ImageViewandroid:id="@+id/centre"android:layout_centerInParent="true"android:layout_width="80dp"android:layout_height="80dp"android:background="@drawable/vw"/><Buttonandroid:id="@+id/close"android:layout_width="55dp"android:layout_height="55dp"android:layout_above="@+id/centre"android:layout_centerHorizontal="true"android:layout_margin="8dp"android:textColor="#000000"android:background="@drawable/st"android:text="白云"/><Buttonandroid:id="@+id/call"android:layout_width="55dp"android:layout_height="55dp"android:layout_below="@+id/centre"android:layout_centerHorizontal="true"android:layout_margin="8dp"android:textColor="#000000"android:background="@drawable/st"android:text="蓝天"/><Buttonandroid:id="@+id/open"android:layout_width="55dp"android:layout_height="55dp"android:layout_toLeftOf="@+id/centre"android:layout_centerVertical="true"android:layout_margin="8dp"android:textColor="#000000"android:background="@drawable/st"android:text="青龙"/><Buttonandroid:id="@+id/save"android:layout_width="55dp"android:layout_height="55dp"android:layout_toRightOf="@+id/centre"android:layout_centerVertical="true"android:layout_margin="8dp"android:textColor="#000000"android:background="@drawable/st"android:text="白虎"/></RelativeLayout>
更多相关文章
- Layout布局
- LinearLayout布局中layout_weight的用法
- Anko:Android 代码动态布局的新方案
- Android局部布局替换实现
- Attribute is missing the Android namespace prefix——android
- [android]布局(容器)简介和使用方法
- android之ListView的item布局问题总结