布局========================================================================
mian_actitvity================================================================
<?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.daydayup.myjddemo.view.activities.MainActivity"> <FrameLayout android:id="@+id/main_content" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1"></FrameLayout> <include layout="@layout/divider1" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:id="@+id/main_sy" android:layout_width="0dp" android:layout_height="@dimen/nav_width" android:layout_weight="1" android:background="@drawable/main_nav_sy_selector" /> <TextView android:id="@+id/main_fl" android:layout_width="0dp" android:layout_height="@dimen/nav_width" android:layout_weight="1" android:background="@drawable/main_nav_fl_selector" /> <TextView android:id="@+id/main_fx" android:layout_width="0dp" android:layout_height="@dimen/nav_width" android:layout_weight="1" android:background="@drawable/main_nav_fx_selector" /> <TextView android:id="@+id/main_gwc" android:layout_width="0dp" android:layout_height="@dimen/nav_width" android:layout_weight="1" android:background="@drawable/main_nav_gwc_selector" /> <TextView android:id="@+id/main_wd" android:layout_width="0dp" android:layout_height="@dimen/nav_width" android:layout_weight="1" android:background="@drawable/main_nav_wd_selector" /> </LinearLayout> </LinearLayout>
divider=======================================================================
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="@dimen/divider_height" android:background="#999999" android:orientation="vertical"> </LinearLayout>
layout_fl===================================================================
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center" android:text="分类" android:textSize="30sp" /> </RelativeLayout>
layout_fx=====================================================================
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity=