DrawerLayout layout and horizontal sliding layout and PullToRefreshScrollView layout

<?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"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    tools:context="com.example.myjun.Second"

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

 

    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:id="@+id/relayout"

        android:orientation="vertical">

        <FrameLayout

            android:layout_width="match_parent"

            android:layout_height="0dp"

            android:layout_weight="9"

            android:id="@+id/frame"

            ></FrameLayout>

        <RadioGroup

            android:layout_width="match_parent"

            android:layout_height="0dp"

            android:layout_weight="1"

            android:id="@+id/group"

            android:orientation="horizontal">

            <RadioButton

                android:layout_width="0dp"

                android:layout_height="match_parent"

                android:button="@null"

                android:layout_weight="1"

                android:text="Home"

                android:id="@+id/btn_01"

                android:gravity="center"/>

            <RadioButton

                android:layout_width="0dp"

                android:layout_height="match_parent"

                android:button="@null"

                android:layout_weight="1"

                android:text="found"

                android:id="@+id/btn_02"

                android:gravity="center"/>

            <RadioButton

                android:layout_width="0dp"

                android:layout_height="match_parent"

                android:button="@null"

                android:layout_weight="1"

                android:text="my"

                android:id="@+id/btn_03"

                android:gravity="center"/>

        </RadioGroup>

 

    </LinearLayout>

    <LinearLayout

        android:layout_width="200dp"

        android:layout_height="match_parent"

        android:layout_gravity="start"

        android:background="#ffff">

        <ListView

            android:layout_width="match_parent"

            android:layout_height="match_parent"></ListView>

    </LinearLayout>

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


2-----Swipe horizontally

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

<RelativeLayout

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

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

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    tools:context="com.example.myjun.HomeFragment">

 

    <android.support.design.widget.TabLayout

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        app:tabGravity="center"

        app:tabIndicatorColor="@color/colorAccent"

        app:tabMode="scrollable"

        app:tabSelectedTextColor="@color/colorPrimaryDark"

        app:tabTextColor="@color/colorPrimary"

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

 

    </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/tablayout"></android.support.v4.view.ViewPager>

 

</RelativeLayout>



3-----PullToRefreshScrollView layout

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

<LinearLayout

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

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

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:orientation="vertical"

    tools:context="com.example.myjun.PagerFragment">

 

    <com.handmark.pulltorefresh.library.PullToRefreshScrollView

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:id="@+id/scroll"

        >

        <LinearLayout

            android:layout_width="match_parent"

            android:layout_height="match_parent"

            android:orientation="vertical">

            <FrameLayout

                android:layout_width="match_parent"

                android:layout_height="wrap_content">

            <android.support.v4.view.ViewPager

                android:layout_width="match_parent"

                android:layout_height="200dp"

                android:id="@+id/lunBo"></android.support.v4.view.ViewPager>

                <LinearLayout

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:orientation="horizontal"

                    android:layout_gravity="bottom"

                    android:id="@+id/lin_point"

                    android:gravity="center"></LinearLayout>

            </FrameLayout>

            <com.example.myjun.MyListView

                android:layout_width="match_parent"

                android:layout_height="match_parent"

                android:id="@+id/lview"></com.example.myjun.MyListView>

        </LinearLayout>

    </com.handmark.pulltorefresh.library.PullToRefreshScrollView>

 

</LinearLayout>


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324876767&siteId=291194637