第二个综合题的布局文件

来源:互联网 发布:政府数据库 编辑:程序博客网 时间:2024/05/16 16:54

<?xml version="1.0" encoding="utf-8"?>

 <android.support.v4.widget.DrawerLayout

        xmlns:android="http://schemas.android.com/apk/res/android"

        xmlns:app="http://schemas.android.com/apk/res-auto"

        android:layout_width="match_parent"

        android:layout_height="match_parent"

    android:id="@+id/mydrawer">


    <!--菜单内容-->

    <RelativeLayout

        android:layout_width="170dp"

        android:layout_height="match_parent"

        android:layout_gravity="end"

        android:id="@+id/menu"

        android:background="#00f">


        <ImageView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:id="@+id/img"

            android:src="@mipmap/ic_launcher"/>


    </RelativeLayout>



<RelativeLayout

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    >


    <android.support.design.widget.TabLayout

        android:layout_width="match_parent"

        android:layout_height="40dp"

        android:id="@+id/mytab"

        app:tabGravity="center"

        app:tabIndicatorColor="@color/colorAccent"

        app:tabMode="scrollable"

        app:tabSelectedTextColor="@color/colorPrimaryDark"

        app:tabTextColor="@color/colorPrimary"

        ></android.support.design.widget.TabLayout>


    <android.support.v4.view.ViewPager

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:id="@+id/vp"

        android:layout_below="@id/mytab"></android.support.v4.view.ViewPager>


</RelativeLayout>

</android.support.v4.widget.DrawerLayout>