布局文件:
<RelativeLayout xmlns:android="http://www.easck.com/apk/res/android"
xmlns:tools="http://www.easck.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.youkumenu.MainActivity" >
<!-- 三级菜单 -->
<RelativeLayout
android:id="@+id/level3_Rl"
android:layout_width="220dp"
android:layout_height="110dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/level3" >
<ImageView
android:id="@+id/channel1"
android:layout_marginLeft="5dp"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/channel1"/>
<ImageView
android:id="@+id/channel2"
android:layout_marginBottom="10dp"
android:layout_marginLeft="25dp"
android:layout_above="@id/channel1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/channel2"/>
<ImageView
android:layout_marginBottom="1dp"
android:layout_marginLeft="52dp"
android:layout_above="@id/channel2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/channel3"/>
<ImageView
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/channel4"/>
<ImageView
android:id="@+id/channel7"
android:layout_marginRight="5dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/channel7"/>
<ImageView
android:id="@+id/channel6"
android:layout_alignParentRight="true"
android:layout_marginBottom="10dp"
android:layout_marginRight="25dp"
android:layout_above="@id/channel7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/channel6"/>
<ImageView
android:layout_marginBottom="1dp"
android:layout_marginRight="52dp"
android:layout_alignParentRight="true"
android:layout_above="@id/channel6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/channel5"/>
</RelativeLayout>
<!-- 二级菜单 -->
<RelativeLayout
android:id="@+id/level2_Rl"
android:layout_width="140dp"
android:layout_height="70dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/level2" >
<ImageView
android:layout_marginLeft="3dp"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_search"/>
<ImageView
android:id="@+id/menu_Iv"
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_menu"/>
<ImageView
android:id="@+id/myyouku_Iv"
android:layout_marginRight="3dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_myyouku"/>
</RelativeLayout>
<!-- 一级菜单 -->
<RelativeLayout
android:layout_width="80dp"
android:layout_height="40dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/level1" >
<ImageView
android:id="@+id/home_Iv"
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_home" />
</RelativeLayout>
</RelativeLayout>










