├── .gitignore
├── .idea
├── .name
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── README.md
├── SlidingMenu.iml
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── libs
│ └── nineoldandroids-2.4.0.jar
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── example
│ │ └── user
│ │ └── slidingmenu
│ │ └── ApplicationTest.java
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── example
│ │ └── user
│ │ └── slidingmenu
│ │ ├── ContentAdapter.java
│ │ ├── ContentItem.java
│ │ ├── MainActivity.java
│ │ ├── MenuAdapter.java
│ │ ├── MenuItem.java
│ │ └── MySlidingMenu.java
│ └── res
│ ├── drawable
│ ├── content.png
│ ├── content_1.png
│ ├── content_10.png
│ ├── content_11.png
│ ├── content_12.png
│ ├── content_13.png
│ ├── content_2.png
│ ├── content_3.png
│ ├── content_4.png
│ ├── content_5.png
│ ├── content_6.png
│ ├── content_7.png
│ ├── content_8.png
│ ├── content_9.png
│ ├── ic_launcher.png
│ ├── menu_1.png
│ ├── menu_10.png
│ ├── menu_2.png
│ ├── menu_3.png
│ ├── menu_4.png
│ ├── menu_5.png
│ ├── menu_6.png
│ ├── menu_7.png
│ ├── menu_8.png
│ ├── menu_9.png
│ └── toggle.png
│ ├── layout
│ ├── activity_main.xml
│ ├── content.xml
│ ├── content_item.xml
│ ├── left_menu.xml
│ └── left_menu_item.xml
│ ├── menu
│ └── menu_main.xml
│ ├── mipmap-hdpi
│ └── ic_launcher.png
│ ├── mipmap-mdpi
│ └── ic_launcher.png
│ ├── mipmap-xhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxhdpi
│ └── ic_launcher.png
│ ├── values-w820dp
│ └── dimens.xml
│ └── values
│ ├── attr.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | /.idea/libraries
5 | .DS_Store
6 | /build
7 | /captures
8 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | SlidingMenu
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | Android API 22 Platform
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | #自定义ViewGroup 打造QQ V5.0 V6.0 风格的侧滑菜单
3 |
4 | 
5 | 
6 | 
7 |
--------------------------------------------------------------------------------
/SlidingMenu.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/app.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | generateDebugAndroidTestSources
19 | generateDebugSources
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.2"
6 |
7 | defaultConfig {
8 | applicationId "com.example.user.slidingmenu"
9 | minSdkVersion 14
10 | targetSdkVersion 23
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.android.support:appcompat-v7:23.1.1'
25 | compile files('libs/nineoldandroids-2.4.0.jar')
26 | }
27 |
--------------------------------------------------------------------------------
/app/libs/nineoldandroids-2.4.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nugongshou110/SlidingMenu/7d9f22a7d267bb4ede10f84bc08f19a7cf7ce77f/app/libs/nineoldandroids-2.4.0.jar
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\Android sdk\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/example/user/slidingmenu/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.example.user.slidingmenu;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/user/slidingmenu/ContentAdapter.java:
--------------------------------------------------------------------------------
1 | package com.example.user.slidingmenu;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.BaseAdapter;
8 | import android.widget.ImageView;
9 | import android.widget.TextView;
10 |
11 | import java.util.List;
12 |
13 | /**
14 | * Created by user on 2016/2/19.
15 | */
16 | public class ContentAdapter extends BaseAdapter {
17 | private Context mContext;
18 | private List mDatas;
19 | private LayoutInflater mInflater;
20 | public ContentAdapter(Context context, List datas){
21 | mContext = context;
22 | mInflater = LayoutInflater.from(context);
23 | mDatas = datas;
24 | }
25 | @Override
26 | public int getCount() {
27 | return mDatas.size();
28 | }
29 |
30 | @Override
31 | public Object getItem(int position) {
32 | return mDatas.get(position);
33 | }
34 |
35 | @Override
36 | public long getItemId(int position) {
37 | return position;
38 | }
39 |
40 | @Override
41 | public View getView(int position, View convertView, ViewGroup parent) {
42 | ViewHolder viewHolder = null;
43 | if (convertView == null){
44 | convertView = mInflater.inflate(R.layout.content_item,parent,false);
45 | viewHolder = new ViewHolder();
46 | viewHolder.mImageView = (ImageView) convertView.findViewById(R.id.content_imageview);
47 | viewHolder.mTextView = (TextView) convertView.findViewById(R.id.content_textview);
48 | convertView.setTag(viewHolder);
49 | }else{
50 | viewHolder = (ViewHolder) convertView.getTag();
51 | }
52 | ContentItem contentItem = mDatas.get(position);
53 | viewHolder.mImageView.setImageResource(contentItem.getResId());
54 | viewHolder.mTextView.setText(contentItem.getName());
55 | return convertView;
56 | }
57 | private static class ViewHolder{
58 | ImageView mImageView;
59 | TextView mTextView;
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/user/slidingmenu/ContentItem.java:
--------------------------------------------------------------------------------
1 | package com.example.user.slidingmenu;
2 |
3 | /**
4 | * Created by user on 2016/2/19.
5 | */
6 | public class ContentItem {
7 | private int resId;
8 | private String name;
9 | public ContentItem(){
10 |
11 | }
12 |
13 | public ContentItem(int resId, String name) {
14 | this.resId = resId;
15 | this.name = name;
16 | }
17 |
18 | public int getResId() {
19 | return resId;
20 | }
21 |
22 | public void setResId(int resId) {
23 | this.resId = resId;
24 | }
25 |
26 | public String getName() {
27 | return name;
28 | }
29 |
30 | public void setName(String name) {
31 | this.name = name;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/user/slidingmenu/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.user.slidingmenu;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.view.Window;
8 | import android.widget.AdapterView;
9 | import android.widget.ImageView;
10 | import android.widget.ListView;
11 | import android.widget.Toast;
12 |
13 | import java.util.ArrayList;
14 | import java.util.List;
15 |
16 |
17 | public class MainActivity extends Activity {
18 | private ViewGroup mMenu;
19 | private ViewGroup mContent;
20 | private MySlidingMenu mSlidingMenu;
21 | private ListView mContentListView;
22 | private ListView mMenuListView;
23 | private ImageView mMenuToggle;
24 | private MenuAdapter mMenuAdapter;
25 | private ContentAdapter mContentAdapter;
26 | private List