zoukankan      html  css  js  c++  java
  • 第二次作业:使用相对布局实现九宫格





    <
    RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" 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="com.example.aaaaaaaa.MainActivity" android:background="#2EFEF7"> <Button android:id="@+id/btn_one" android:layout_width="80dp" android:layout_height="80dp" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:background="#000000" /> <Button android:id="@+id/btn_two" android:layout_width="80dp" android:layout_height="80dp" android:layout_above="@+id/btn_one" android:layout_alignLeft="@+id/btn_one" android:background="#E93F97"/> <Button android:id="@+id/btn_tree" android:layout_width="80dp" android:layout_height="80dp" android:layout_alignBaseline="@+id/btn_two" android:layout_alignBottom="@+id/btn_two" android:layout_toLeftOf="@+id/btn_two" android:background="#FFFFFF" /> <Button android:id="@+id/btn_four" android:layout_width="80dp" android:layout_height="80dp" android:layout_alignLeft="@+id/btn_tree" android:layout_below="@+id/btn_tree" android:background="#088A29" /> <Button android:id="@+id/btn_five" android:layout_width="80dp" android:layout_height="80dp" android:layout_above="@+id/btn_one" android:layout_toRightOf="@+id/btn_one" android:background="#F4FA58"/> <Button android:id="@+id/btn_six" android:layout_width="80dp" android:layout_height="80dp" android:layout_alignLeft="@+id/btn_five" android:layout_below="@+id/btn_five" android:background="#013ADF"/> /> <Button android:id="@+id/btn_seven" android:layout_width="80dp" android:layout_height="80dp" android:layout_below="@+id/btn_one" android:layout_toRightOf="@+id/btn_four" android:background="#2E9AFE"/> <Button android:id="@+id/btn_eight" android:layout_width="80dp" android:layout_height="80dp" android:layout_alignLeft="@+id/btn_four" android:layout_below="@+id/btn_four" android:background="#DF0101"/> <Button android:id="@+id/btn_nine" android:layout_width="80dp" android:layout_height="80dp" android:layout_below="@+id/btn_one" android:layout_toRightOf="@+id/btn_one" android:background="#40FF00"/> </RelativeLayout>
  • 相关阅读:
    ELK
    alerta 集中化告警信息 -zabbix
    Python安装第三方模块出错 No module named setuptools
    Centos7 搭建bind9.9
    DNS 处理模块 dnspython
    varnish 项目实战
    中文版Postman测试需要登陆才能访问的接口(基于Cookie)
    fireFox模拟 post请求、上传插件,火狐浏览器中文postman插件
    MySQL单表最大记录数不能超过多少?
    ApiPost(中文版postman)如何发送一个随机数或者时间戳?
  • 原文地址:https://www.cnblogs.com/xffzcjlove/p/11452161.html
Copyright © 2011-2022 走看看