//shape
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
>
<solid android:color="@color/black"></solid>
</shape>
//SecondActivity布局
<?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:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.bwie.Month_4.activity.SecondActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<ImageView
android:id="@+id/image_head"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@mipmap/ic_launcher"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="项目模拟"
android:textSize="20sp"
android:textColor="@color/colorAccent"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
<FrameLayout
android:id="@+id/framelayout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="9"></FrameLayout>
<RadioGroup
android:id="@+id/radio_group"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:button="@null"
android:checked="true"
android:drawableTop="@drawable/img_selector"
android:gravity="center"
android:textColor="@drawable/text_selector"
android:text="首页"></RadioButton>
<RadioButton
android:id="@+id/rb2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:button="@null"
android:drawableTop="@drawable/img_selector"
android:gravity="center"
android:textColor="@drawable/text_selector"
android:text="首页"></RadioButton>
<RadioButton
android:id="@+id/rb3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:button="@null"
android:drawableTop="@drawable/img_selector"
android:gravity="center"
android:textColor="@drawable/text_selector"
android:text="首页"></RadioButton>
<RadioButton
android:id="@+id/rb4"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:button="@null"
android:drawableTop="@drawable/img_selector"
android:gravity="center"
android:textColor="@drawable/text_selector"
android:text="首页"></RadioButton>
</RadioGroup>
</LinearLayout>
<LinearLayout
android:layout_width="300dp"
android:layout_height="match_parent"
android:layout_gravity="left"
android:background="@color/colorPrimaryDark"></LinearLayout>
</android.support.v4.widget.DrawerLayout>
//频道管理布局文件
<?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:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.bwie.Month_4.activity.SecondActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<ImageView
android:id="@+id/image_head"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@mipmap/ic_launcher"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="项目模拟"
android:textSize="20sp"
android:textColor="@color/colorAccent"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
<FrameLayout
android:id="@+id/framelayout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="9"></FrameLayout>
<RadioGroup
android:id="@+id/radio_group"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:button="@null"
android:checked="true"
android:drawableTop="@drawable/img_selector"
android:gravity="center"
android:textColor="@drawable/text_selector"
android:text="首页"></RadioButton>
<RadioButton
android:id="@+id/rb2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:button="@null"
android:drawableTop="@drawable/img_selector"
android:gravity="center"
android:textColor="@drawable/text_selector"
android:text="首页"></RadioButton>
<RadioButton
android:id="@+id/rb3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:button="@null"
android:drawableTop="@drawable/img_selector"
android:gravity="center"
android:textColor="@drawable/text_selector"
android:text="首页"></RadioButton>
<RadioButton
android:id="@+id/rb4"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:button="@null"
android:drawableTop="@drawable/img_selector"
android:gravity="center"
android:textColor="@drawable/text_selector"
android:text="首页"></RadioButton>
</RadioGroup>
</LinearLayout>
<LinearLayout
android:layout_width="300dp"
android:layout_height="match_parent"
android:layout_gravity="left"
android:background="@color/colorPrimaryDark"></LinearLayout>
</android.support.v4.widget.DrawerLayout>
//bannerlayout布局
<?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="200dp">
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:id="@+id/ll_points"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:background="#223c3c3c"
android:gravity="center"
android:orientation="horizontal" />
</RelativeLayout>
//channel_head布局
<?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="wrap_content"
android:padding="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="60dp"
android:gravity="center"
android:text="我的频道"
android:textAppearance="@android:style/TextAppearance.Holo.Medium" />
</RelativeLayout>
//firstfragment布局
<?xml version="1.0" encoding="utf-8"?>
<com.handmark.pulltorefresh.library.PullToRefreshListView
android:layout_width="match_parent"
android:id="@+id/pulltorefresh"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android" />
//主Fragment布局
<?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"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal"
>
<android.support.design.widget.TabLayout
android:id="@+id/tb_layout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:layout_weight="1"
app:tabMode="scrollable"
></android.support.design.widget.TabLayout>
<ImageView
android:id="@+id/img_add"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/ic_add_black_24dp"
/>
</LinearLayout>
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="9"
></android.support.v4.view.ViewPager>
</LinearLayout>