优酷环形菜单

布局文件,使用<RelativeLayout/>控件作为第一级菜单,相对布局,位于父控件的底部,水平居中,因为图片不是特别的标准,因此宽度和高度都钉死,宽度是高度的两倍

二次菜单和三级菜单都一样的布局

小房子的图标<imageView/>控件,在父控件中居中

第二级搜索图标,位于父控件的底部,上下左右maigin10dp

第二级菜单图标,位于父控件的顶部,水平居中,marginTop 10dp

第二级叹号图标,位于父控件的底部,右边,margin 10dp

第三级的图标比较多,但是原理和第二级一样,只不过通过margin来定位

第三级channel2的图标,位于channel1图标的上面,和channel1左边对齐,marginLeft 20dp,marginBottom 6dp

第三级channel3的图标,位于channel2图标的上面,和channel2左边对齐,marginLeft 30dp,marginBottom 6dp

第三级channel4的图标,位于父控件的上面,水平居中,marginTop 5dp

左侧半圆结束,右侧半圆和左侧一样的步骤

布局代码:

<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"
tools:context="${relativePackage}.${activityClass}" > <RelativeLayout
android:layout_width="100dp"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/level1" > <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/icon_home" />
</RelativeLayout> <RelativeLayout
android:layout_width="180dp"
android:layout_height="90dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/level2" > <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="10dp"
android:background="@drawable/icon_search" /> <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:background="@drawable/icon_menu" /> <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_margin="10dp"
android:background="@drawable/icon_myyouku" />
</RelativeLayout> <RelativeLayout
android:layout_width="280dp"
android:layout_height="140dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/level3" > <ImageView
android:id="@+id/channel1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:background="@drawable/channel1" /> <ImageView
android:id="@+id/channel2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/channel1"
android:layout_alignLeft="@id/channel1"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:background="@drawable/channel2" />
<ImageView
android:id="@+id/channel3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/channel2"
android:layout_alignLeft="@id/channel2"
android:layout_marginBottom="10dp"
android:layout_marginLeft="34dp"
android:background="@drawable/channel3" />
<ImageView
android:id="@+id/channel4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_centerHorizontal="true"
android:background="@drawable/channel4" /> <ImageView
android:id="@+id/channel7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/channel7" />
<ImageView
android:id="@+id/channel6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/channel7"
android:layout_alignRight="@id/channel7"
android:layout_marginBottom="10dp"
android:layout_marginRight="20dp"
android:background="@drawable/channel6" />
<ImageView
android:id="@+id/channel5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/channel6"
android:layout_alignRight="@id/channel6"
android:layout_marginBottom="10dp"
android:layout_marginRight="34dp"
android:background="@drawable/channel5" />
</RelativeLayout> </RelativeLayout>

最新文章

  1. SQL Server-聚焦NOT EXISTS AND NOT IN性能分析(十五)
  2. 点击显示div
  3. SNMP 原理与实战详解
  4. 终于有SpringMvc与Struts2的对比啦
  5. JVM的内存分配与垃圾回收策略
  6. 新冲刺Sprint3(第三天)
  7. ubuntu 15 安装Qt
  8. JAVA-语法-运算符
  9. [转]Linux下which、whereis、locate、find 命令的区别
  10. android系统启动时自动运行自己的程序
  11. Codeforces294B - Shaass and Bookshelf(贪心)
  12. Android版本分布——2016年10月更新
  13. 十年linux命令总结
  14. HTML 标记
  15. opencv+python3.4的人脸识别----2017-7-19
  16. YOLO_Online 将深度学习最火的目标检测做成在线服务实战经验分享
  17. 【Java】+SOFA
  18. 学习使用Mendeley1
  19. 将本地代码上传到github走过的坑
  20. matlab中fix函数,floor函数,ceil函数

热门文章

  1. 一些LinuxC的小知识点(一)
  2. JS原生事件处理(跨浏览器)
  3. JAVA学习笔记1——环境配置
  4. eclipse代码提示javadoc背景为黑色框的解决办法
  5. ASP.NET Core WebApi 项目部署到 IIS 服务器的总结
  6. D3.js的基础部分之选择集的处理 enter和exit的处理方法 (v3版本)
  7. odoo开发 相关知识点
  8. 再续session和cookie (网络整理)
  9. @RequestParam注解
  10. Feign status 400 reading 问题分析