fragment_home_main.xml 14.3 KB
<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v4.widget.SwipeRefreshLayout
        android:id="@+id/swiperefreshlayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.chudiangameplay.android.ui.view.MultiStateView
            android:id="@+id/multiplestatusView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:msv_emptyView="@layout/view_public_empty"
            app:msv_errorView="@layout/view_public_error_view"
            app:msv_loadingView="@layout/view_public_loading_view">

            <android.support.design.widget.CoordinatorLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <android.support.design.widget.AppBarLayout
                    android:id="@+id/app_bar"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:theme="@style/AppTheme.AppBarOverlay"
                    app:elevation="0dp">

                    <android.support.design.widget.CollapsingToolbarLayout
                        android:id="@+id/toolbar_layout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:background="#f4f4f4"
                        app:contentScrim="?attr/colorPrimary"
                        app:layout_scrollFlags="scroll|exitUntilCollapsed">

                        <android.support.v7.widget.Toolbar
                            android:id="@+id/toolbar"
                            android:layout_width="match_parent"
                            android:layout_height="55dp"
                            android:background="@android:color/transparent"
                            app:layout_collapseMode="pin">

                        </android.support.v7.widget.Toolbar>

                        <!--头部-->
                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="65dp"
                            android:orientation="vertical"
                            app:layout_collapseMode="pin"
                            app:layout_collapseParallaxMultiplier="0.5">

                            <!--搜索-->
                            <LinearLayout
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:background="#fff"
                                android:gravity="center_vertical"
                                android:orientation="horizontal"
                                android:paddingBottom="6dp"
                                android:paddingLeft="16dp"
                                android:paddingRight="16dp"
                                android:paddingTop="6dp">

                                <LinearLayout
                                    android:id="@+id/ll_search"
                                    android:layout_width="0dp"
                                    android:layout_height="32dp"
                                    android:layout_centerInParent="true"
                                    android:layout_weight="1"
                                    android:background="@drawable/shape_circle_f5f5f5"
                                    android:gravity="center_vertical"
                                    android:orientation="horizontal">

                                    <ImageView
                                        android:layout_width="12dp"
                                        android:layout_height="12dp"
                                        android:layout_marginLeft="12dp"
                                        android:src="@drawable/ico_search" />

                                    <TextView
                                        android:layout_width="0dp"
                                        android:layout_height="match_parent"
                                        android:layout_marginLeft="10dp"
                                        android:layout_weight="1"
                                        android:gravity="center_vertical"
                                        android:imeOptions="actionSearch"
                                        android:text="@string/home_search_hint"
                                        android:textColor="#999"
                                        android:textSize="12sp" />

                                    <ImageView
                                        android:id="@+id/iv_clear"
                                        android:layout_width="12dp"
                                        android:layout_height="12dp"
                                        android:layout_marginLeft="12dp"
                                        android:layout_marginRight="12dp"
                                        android:src="@drawable/ico_input_delete"
                                        android:visibility="gone" />
                                </LinearLayout>

                                <LinearLayout
                                    android:id="@+id/ll_addnews"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginLeft="26dp"
                                    android:gravity="center"
                                    android:orientation="horizontal">

                                    <ImageView
                                        android:layout_width="20dp"
                                        android:layout_height="20dp"
                                        android:src="@drawable/ico_home_main_addnews" />

                                    <TextView
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                        android:layout_marginLeft="6dp"
                                        android:text="发动态"
                                        android:textColor="#ff333333"
                                        android:textSize="15sp" />

                                </LinearLayout>
                            </LinearLayout>

                            <!--banner-->
                            <com.chudiangameplay.android.ui.view.AutoRollViewPager
                                android:id="@+id/autorollviewpager"
                                android:layout_width="match_parent"
                                android:layout_height="80dp"
                                android:layout_marginLeft="12dp"
                                android:layout_marginRight="12dp"
                                android:layout_marginTop="10dp" />

                            <!--分类列表-->
                            <LinearLayout
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_marginLeft="12dp"
                                android:layout_marginRight="12dp"
                                android:layout_marginTop="9dp"
                                android:background="@drawable/shape_round6dp_ffffff"
                                android:orientation="horizontal"
                                android:paddingBottom="20dp"
                                android:paddingTop="4dp">

                                <android.support.v7.widget.RecyclerView
                                    android:id="@+id/recyclerview_category"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content" />

                            </LinearLayout>

                            <!--聊天室入口-->
                            <LinearLayout
                                android:id="@+id/ll_room"
                                android:layout_marginTop="10dp"
                                android:layout_width="match_parent"
                                android:layout_height="136dp"
                                android:layout_marginLeft="12dp"
                                android:layout_marginRight="12dp"
                                android:background="@drawable/shape_round6dp_ffffff"
                                android:orientation="vertical"
                                android:paddingLeft="12dp"
                                android:paddingRight="12dp">

                                <LinearLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:layout_marginTop="17dp"
                                    android:gravity="center_vertical"
                                    android:orientation="horizontal">

                                    <ImageView
                                        android:layout_width="16dp"
                                        android:layout_height="16dp"
                                        android:src="@drawable/ico_homemain_toroom" />

                                    <TextView
                                        android:layout_width="0dp"
                                        android:layout_height="wrap_content"
                                        android:layout_marginLeft="7dp"
                                        android:layout_weight="1"
                                        android:text="语音派单"
                                        android:textColor="#ff333333"
                                        android:textSize="16sp"
                                        android:textStyle="bold" />

                                    <TextView
                                        android:id="@+id/tv_to_roomlist"
                                        android:layout_width="60dp"
                                        android:layout_height="22dp"
                                        android:background="@drawable/shape_circle_stroke_cccccc"
                                        android:gravity="center"
                                        android:text="查看全部"
                                        android:textColor="#ff333333"
                                        android:textSize="11sp" />

                                </LinearLayout>

                                <!--聊天室列表-->
                                <RelativeLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    android:layout_marginTop="16dp">

                                    <!--banner-->
                                    <com.chudiangameplay.android.ui.view.AutoRollViewPager_HomeRoomList
                                        android:id="@+id/autorollviewpager_roomlist"
                                        android:layout_width="match_parent"
                                        android:layout_height="match_parent" />

                                </RelativeLayout>
                            </LinearLayout>
                        </LinearLayout>

                        <!--26+26+ 26 = -->
                        <RelativeLayout
                            android:layout_width="match_parent"
                            android:layout_height="55dp"
                            android:layout_gravity="bottom"
                            android:layout_marginLeft="12dp"
                            android:layout_marginRight="12dp"
                            android:background="@drawable/shape_homemain_tophalf_ffffff_bg"
                            android:orientation="vertical"
                            app:layout_collapseMode="pin">

                            <com.chudiangameplay.android.ui.view.HomeMainTabIndicator
                                android:id="@+id/mytabindicator"
                                android:layout_width="match_parent"
                                android:layout_height="match_parent"
                                android:layout_centerVertical="true"
                                android:layout_marginLeft="12dp" />

                            <TextView
                                android:id="@+id/tv_shaixuan"
                                android:layout_width="60dp"
                                android:layout_height="22dp"
                                android:layout_alignParentRight="true"
                                android:layout_centerVertical="true"
                                android:layout_marginRight="12dp"
                                android:background="@drawable/shape_circle_stroke_cccccc"
                                android:gravity="center"
                                android:text="筛选"
                                android:textColor="#ff333333"
                                android:textSize="11sp" />

                        </RelativeLayout>

                    </android.support.design.widget.CollapsingToolbarLayout>
                </android.support.design.widget.AppBarLayout>

                <com.chudiangameplay.android.ui.view.HomeMain_ViewPager
                    android:id="@+id/viewpager"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginLeft="12dp"
                    android:layout_marginRight="12dp"
                    android:background="#fff"
                    app:layout_behavior="@string/appbar_scrolling_view_behavior"></com.chudiangameplay.android.ui.view.HomeMain_ViewPager>

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

        </com.chudiangameplay.android.ui.view.MultiStateView>
    </android.support.v4.widget.SwipeRefreshLayout>
</RelativeLayout>