//效果图如下
//添加权限
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
android:name=".MyApplication"//导入的依赖包、jar包,,,design包、imageLoader包、gson包,,导入library文件,新建一个自己的项目,然后把library文件导入项目中
layout包里 activity_main 布局
<?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.samsung.week3.MainActivity"> <android.support.v4.widget.DrawerLayout android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <FrameLayout android:id="@+id/fr_main" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"></FrameLayout> <RadioGroup android:id="@+id/rg" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/rb_shouye" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:button="@null" android:gravity="center" android:checked="true" android:background="@drawable/bianse" android:text="首页" /> <RadioButton android:id="@+id/rb_faxian" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:button="@null" android:background="@drawable/bianse" android:gravity="center" android:text="发现" /> <RadioButton android:id="@+id/rb_xiazai" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/bianse" android:button="@null" android:gravity="center" android:text="下载" /> <RadioButton android:id="@+id/rb_wode" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/bianse" android:button="@null" android:gravity="center" android:text="我的" /> </RadioGroup> </LinearLayout> <LinearLayout android:layout_width="240dp" android:layout_height="match_parent" android:layout_gravity="start" android:background="#fff" android:gravity="center" android:orientation="vertical"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@mipmap/ic_launcher" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="钱包" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="行程记录" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="好友邀请" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="设置" /> </LinearLayout> </android.support.v4.widget.DrawerLayout> </LinearLayout>
![大笑](http://static.blog.csdn.net/xheditor/xheditor_emot/default/laugh.gif)
![大笑](http://static.blog.csdn.net/xheditor/xheditor_emot/default/laugh.gif)
![大笑](http://static.blog.csdn.net/xheditor/xheditor_emot/default/laugh.gif)
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.c