├── .gitignore
├── README.md
├── app
├── .gitignore
├── build.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── example
│ │ └── materialdesignnavigationdrawer
│ │ ├── activities
│ │ ├── AboutActivity.java
│ │ ├── AccountActivity.java
│ │ ├── HelpAndFeedbackActivity.java
│ │ └── MainActivity.java
│ │ └── fragments
│ │ └── ImageFragment.java
│ ├── res
│ ├── drawable-land-nodpi
│ │ ├── morpheus.jpg
│ │ ├── neo.jpg
│ │ └── persephone.jpg
│ ├── drawable-nodpi
│ │ ├── Neo.jpg
│ │ ├── code.png
│ │ ├── image_nav_drawer_account_background.jpg
│ │ ├── keymaker.jpg
│ │ ├── morpheus.jpg
│ │ └── persephone.jpeg
│ ├── drawable-v21
│ │ └── nav_drawer_header_foreground.xml
│ ├── drawable
│ │ ├── ic_account_circle_white_64dp.xml
│ │ ├── ic_explore_white_24dp.xml
│ │ ├── ic_help_white_24dp.xml
│ │ ├── ic_home_white_24dp.xml
│ │ ├── ic_info_white_24dp.xml
│ │ ├── ic_menu_white_24dp.xml
│ │ └── nav_drawer_header_foreground.xml
│ ├── layout-v21
│ │ └── toolbar.xml
│ ├── layout
│ │ ├── about_activity.xml
│ │ ├── account_activity.xml
│ │ ├── help_and_feddback_activity.xml
│ │ ├── image_fragment.xml
│ │ ├── main_activity.xml
│ │ ├── navigation_drawer_header.xml
│ │ └── toolbar.xml
│ ├── menu
│ │ └── navigation_drawer_body.xml
│ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ ├── values-sw600dp
│ │ └── dimens.xml
│ ├── values-v21
│ │ └── themes.xml
│ ├── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ ├── styles.xml
│ │ └── themes.xml
│ └── web_hi_res_512.png
│ └── web_hi_res_512.png
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.gitignore.io
2 |
3 | ### Android ###
4 | # Built application files
5 | *.apk
6 | # Files for the Dalvik VM
7 | *.dex
8 |
9 | # Generated files
10 | bin/
11 | gen/
12 |
13 | # Gradle files
14 | .gradle/
15 | build/
16 |
17 | # Local configuration file (sdk path, etc)
18 | local.properties
19 |
20 | # Proguard folder generated by Eclipse
21 | proguard/
22 |
23 | # Log Files
24 | *.log
25 |
26 | ### Android Patch ###
27 | gen-external-apklibs
28 |
29 |
30 | ### Intellij ###
31 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
32 |
33 | *.iml
34 |
35 | ## Directory-based project format:
36 | .idea/
37 | # if you remove the above rule, at least ignore the following:
38 |
39 | # User-specific stuff:
40 | # .idea/workspace.xml
41 | # .idea/tasks.xml
42 | # .idea/dictionaries
43 |
44 | # Sensitive or high-churn files:
45 | # .idea/dataSources.ids
46 | # .idea/dataSources.xml
47 | # .idea/sqlDataSources.xml
48 | # .idea/dynamic.xml
49 | # .idea/uiDesigner.xml
50 |
51 | # Gradle:
52 | # .idea/gradle.xml
53 | # .idea/libraries
54 |
55 | # Mongo Explorer plugin:
56 | # .idea/mongoSettings.xml
57 |
58 | ## File-based project format:
59 | *.ipr
60 | *.iws
61 |
62 | ## Plugin-specific files:
63 |
64 | # IntelliJ
65 | /out/
66 |
67 | # mpeltonen/sbt-idea plugin
68 | .idea_modules/
69 |
70 | # JIRA plugin
71 | atlassian-ide-plugin.xml
72 |
73 | # Crashlytics plugin (for Android Studio and IntelliJ)
74 | com_crashlytics_export_strings.xml
75 | crashlytics.properties
76 | crashlytics-build.properties
77 |
78 |
79 | # Ignore Gradle GUI config
80 | gradle-app.setting
81 |
82 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
83 | !gradle-wrapper.jar
84 |
85 |
86 | ### OSX ###
87 | .DS_Store
88 | .AppleDouble
89 | .LSOverride
90 |
91 | # Icon must end with two \r
92 | Icon
93 |
94 |
95 | # Thumbnails
96 | ._*
97 |
98 | # Files that might appear in the root of a volume
99 | .DocumentRevisions-V100
100 | .fseventsd
101 | .Spotlight-V100
102 | .TemporaryItems
103 | .Trashes
104 | .VolumeIcon.icns
105 |
106 | # Directories potentially created on remote AFP share
107 | .AppleDB
108 | .AppleDesktop
109 | Network Trash Folder
110 | Temporary Items
111 | .apdisk
112 |
113 |
114 | ### Windows ###
115 | # Windows image file caches
116 | Thumbs.db
117 | ehthumbs.db
118 |
119 | # Folder config file
120 | Desktop.ini
121 |
122 | # Recycle Bin used on file shares
123 | $RECYCLE.BIN/
124 |
125 | # Windows Installer files
126 | *.cab
127 | *.msi
128 | *.msm
129 | *.msp
130 |
131 | # Windows shortcuts
132 | *.lnk
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Material Design Navigation Drawer
2 |
3 | This is a sample app about how to implement the [Navigation Drawer following the Material Design guidelines](https://goo.gl/qpKNsR).
4 |
5 | This implementation uses the [Navigation View](https://goo.gl/XwIo9D) from the [Design Support Library](http://goo.gl/GgLTjB).
6 | For an implementation that does NOT use [Design Support Library](http://goo.gl/GgLTjB) check out [this branch](https://goo.gl/etnw5Q)
7 |
8 | Check out these articles for further information.
9 |
10 | 1. [Navigation Drawer: Sizing](http://goo.gl/Zc3kMT)
11 | 2. [Navigation Drawer: Styling](http://goo.gl/rTS3MF)
12 | 3. [Navigation Drawer: Navigating](https://goo.gl/wjT568)
13 |
14 | ## License
15 |
16 | The contents of this repository are covered under the [MIT License](LICENSE).
17 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion '25.0.3'
6 |
7 | defaultConfig {
8 | applicationId "com.example.materialdesignnavdrawer"
9 | vectorDrawables.useSupportLibrary = true
10 | minSdkVersion 16
11 | targetSdkVersion 25
12 | versionCode 1
13 | versionName "1.0"
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | }
19 | }
20 |
21 | dexOptions {
22 | javaMaxHeapSize "3g"
23 | }
24 | }
25 |
26 | dependencies {
27 | compile fileTree(dir: 'libs', include: ['*.jar'])
28 | compile 'com.android.support:design:25.3.1'
29 | compile 'com.android.support:percent:25.3.1'
30 | compile 'com.android.support:appcompat-v7:25.3.1'
31 | compile 'com.android.support:support-annotations:25.3.1'
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
27 |
28 |
32 |
33 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/materialdesignnavigationdrawer/activities/AboutActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.materialdesignnavigationdrawer.activities;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.support.v7.widget.Toolbar;
6 | import com.example.materialdesignnavdrawer.R;
7 |
8 | public class AboutActivity extends AppCompatActivity {
9 |
10 | @Override
11 | public void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.about_activity);
14 | init();
15 | }
16 |
17 | private void init() {
18 | setUpToolbar();
19 | }
20 |
21 | private void setUpToolbar() {
22 | final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
23 | setSupportActionBar(toolbar);
24 |
25 | if (getSupportActionBar() != null) {
26 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/materialdesignnavigationdrawer/activities/AccountActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.materialdesignnavigationdrawer.activities;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.support.v7.widget.Toolbar;
6 | import com.example.materialdesignnavdrawer.R;
7 |
8 | public class AccountActivity extends AppCompatActivity {
9 |
10 | @Override
11 | public void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.account_activity);
14 | init();
15 | }
16 |
17 | private void init() {
18 | setUpToolbar();
19 | }
20 |
21 | private void setUpToolbar() {
22 | final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
23 | setSupportActionBar(toolbar);
24 |
25 | if (getSupportActionBar() != null) {
26 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/materialdesignnavigationdrawer/activities/HelpAndFeedbackActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.materialdesignnavigationdrawer.activities;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.support.v7.widget.Toolbar;
6 | import com.example.materialdesignnavdrawer.R;
7 |
8 | public class HelpAndFeedbackActivity extends AppCompatActivity {
9 |
10 | @Override
11 | public void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.help_and_feddback_activity);
14 | init();
15 | }
16 |
17 | private void init() {
18 | setUpToolbar();
19 | }
20 |
21 | private void setUpToolbar() {
22 | final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
23 | setSupportActionBar(toolbar);
24 |
25 | if (getSupportActionBar() != null) {
26 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/materialdesignnavigationdrawer/activities/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.materialdesignnavigationdrawer.activities;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.os.Handler;
7 | import android.support.annotation.NonNull;
8 | import android.support.annotation.Nullable;
9 | import android.support.annotation.StringRes;
10 | import android.support.design.widget.NavigationView;
11 | import android.support.v4.view.GravityCompat;
12 | import android.support.v4.widget.DrawerLayout;
13 | import android.support.v7.app.ActionBar;
14 | import android.support.v7.app.AppCompatActivity;
15 | import android.support.v7.widget.Toolbar;
16 | import android.view.MenuItem;
17 | import android.view.View;
18 | import com.example.materialdesignnavdrawer.R;
19 | import com.example.materialdesignnavigationdrawer.fragments.ImageFragment;
20 |
21 | public class MainActivity extends AppCompatActivity {
22 |
23 | private final static String sKEY_ACTIONBAR_TITLE = "actionBarTitle";
24 | private static final int sDELAY_MILLIS = 250;
25 |
26 | private Toolbar mToolbar;
27 | private Context mContext;
28 | private DrawerLayout mDrawerLayout;
29 | private NavigationView mNavigationView;
30 |
31 | @Override
32 | protected void onCreate(Bundle savedInstanceState) {
33 | super.onCreate(savedInstanceState);
34 | setContentView(R.layout.main_activity);
35 | init(savedInstanceState);
36 | }
37 |
38 | private void init(@Nullable final Bundle savedInstanceState) {
39 | bindResources();
40 | setUpToolbar();
41 | setUpDrawer();
42 | restoreState(savedInstanceState);
43 | }
44 |
45 | private void bindResources() {
46 | mContext = this;
47 | mToolbar = (Toolbar) findViewById(R.id.toolbar);
48 | mDrawerLayout = (DrawerLayout) findViewById(R.id.main_activity_DrawerLayout);
49 | mNavigationView = (NavigationView) findViewById(R.id.activity_main_navigation_view);
50 | }
51 |
52 | private void setUpToolbar() {
53 | setSupportActionBar(mToolbar);
54 |
55 | final ActionBar actionBar = getSupportActionBar();
56 |
57 | if (actionBar != null) {
58 | actionBar.setHomeAsUpIndicator(R.drawable.ic_menu_white_24dp);
59 | actionBar.setDisplayHomeAsUpEnabled(true);
60 | }
61 | }
62 |
63 | private void setUpDrawer() {
64 | mNavigationView
65 | .getHeaderView(0)
66 | .findViewById(R.id.navigation_drawer_header_clickable)
67 | .setOnClickListener(new View.OnClickListener() {
68 | @Override
69 | public void onClick(View v) {
70 | mDrawerLayout.closeDrawer(GravityCompat.START);
71 | startActivityWithDelay(AccountActivity.class);
72 | }
73 | });
74 |
75 | mNavigationView.setNavigationItemSelectedListener
76 | (
77 | new NavigationView.OnNavigationItemSelectedListener() {
78 | @Override
79 | public boolean onNavigationItemSelected(final MenuItem item) {
80 | mDrawerLayout.closeDrawer(GravityCompat.START);
81 |
82 | switch (item.getItemId()) {
83 | case R.id.navigation_view_item_home:
84 | item.setChecked(true);
85 | setToolbarTitle(R.string.toolbar_title_home);
86 | showImageFragment(ImageFragment.sIMAGE_NEO);
87 | break;
88 |
89 | case R.id.navigation_view_item_explore:
90 | setToolbarTitle(R.string.toolbar_title_explore);
91 | showImageFragment(ImageFragment.sIMAGE_MORPHEUS);
92 | item.setChecked(true);
93 | break;
94 |
95 | case R.id.navigation_view_item_help:
96 | startActivityWithDelay(HelpAndFeedbackActivity.class);
97 | break;
98 |
99 | case R.id.navigation_view_item_about:
100 | startActivityWithDelay(AboutActivity.class);
101 | break;
102 | }
103 |
104 | return true;
105 | }
106 | }
107 | );
108 | }
109 |
110 | private void restoreState(final @Nullable Bundle savedInstanceState) {
111 | // This allow us to know if the activity was recreated
112 | // after orientation change and restore the Toolbar title
113 | if (savedInstanceState == null) {
114 | showDefaultFragment();
115 | } else {
116 | setToolbarTitle((String) savedInstanceState.getCharSequence(sKEY_ACTIONBAR_TITLE));
117 | }
118 | }
119 |
120 | private void showDefaultFragment() {
121 | setToolbarTitle(R.string.toolbar_title_home);
122 | showImageFragment(ImageFragment.sIMAGE_NEO);
123 | }
124 |
125 | private void showImageFragment(final int imageCode) {
126 | final Bundle bundle = getImageFragmentBundle(imageCode);
127 | replaceFragmentWithDelay(bundle);
128 | }
129 |
130 | /**
131 | * We start the transaction with delay to avoid junk while closing the drawer
132 | */
133 | private void replaceFragmentWithDelay(@NonNull final Bundle bundle) {
134 | new Handler().postDelayed(new Runnable() {
135 | @Override
136 | public void run() {
137 | getSupportFragmentManager()
138 | .beginTransaction()
139 | .replace(R.id.main_activity_content_frame, ImageFragment.newInstance(bundle))
140 | .commit();
141 | }
142 | }, sDELAY_MILLIS);
143 | }
144 |
145 | @NonNull
146 | private Bundle getImageFragmentBundle(final int imageCode) {
147 | final Bundle bundle = new Bundle();
148 | bundle.putInt(ImageFragment.sARGUMENT_IMAGE_CODE, imageCode);
149 | return bundle;
150 | }
151 |
152 | private void setToolbarTitle(@StringRes final String title) {
153 | if (getSupportActionBar() != null) {
154 | getSupportActionBar().setTitle(title);
155 | }
156 | }
157 |
158 | private String getToolbarTitle() {
159 | if (getSupportActionBar() != null) {
160 | return (String) getSupportActionBar().getTitle();
161 | }
162 |
163 | return getString(R.string.app_name);
164 | }
165 |
166 | private void setToolbarTitle(@StringRes final int string) {
167 | if (getSupportActionBar() != null) {
168 | getSupportActionBar().setTitle(string);
169 | }
170 | }
171 |
172 | /**
173 | * We start this activities with delay to avoid junk while closing the drawer
174 | */
175 | private void startActivityWithDelay(@NonNull final Class activity) {
176 | new Handler().postDelayed(new Runnable() {
177 | @Override
178 | public void run() {
179 | startActivity(new Intent(mContext, activity));
180 | }
181 | }, sDELAY_MILLIS);
182 | }
183 |
184 | @Override
185 | public boolean onOptionsItemSelected(MenuItem item) {
186 | switch (item.getItemId()) {
187 | case android.R.id.home:
188 | mDrawerLayout.openDrawer(GravityCompat.START);
189 | return true;
190 | }
191 | return super.onOptionsItemSelected(item);
192 | }
193 |
194 | @Override
195 | protected void onSaveInstanceState(final Bundle outState) {
196 | outState.putCharSequence(sKEY_ACTIONBAR_TITLE, getToolbarTitle());
197 | super.onSaveInstanceState(outState);
198 | }
199 | }
200 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/materialdesignnavigationdrawer/fragments/ImageFragment.java:
--------------------------------------------------------------------------------
1 | package com.example.materialdesignnavigationdrawer.fragments;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.NonNull;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.app.Fragment;
7 | import android.support.v4.content.ContextCompat;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.ImageView;
12 | import com.example.materialdesignnavdrawer.R;
13 |
14 | public class ImageFragment extends Fragment {
15 |
16 | public static final int sIMAGE_NEO = 0;
17 | public static final int sIMAGE_MORPHEUS = 1;
18 | public static final String sARGUMENT_IMAGE_CODE = "image";
19 |
20 | public static ImageFragment newInstance(@NonNull final Bundle bundle) {
21 | final ImageFragment imageFragment = new ImageFragment();
22 | imageFragment.setArguments(bundle);
23 | return imageFragment;
24 | }
25 |
26 | @Override
27 | public View onCreateView
28 | (
29 | LayoutInflater inflater,
30 | @Nullable ViewGroup container,
31 | @Nullable Bundle savedInstanceState
32 | ) {
33 | final View view = inflater.inflate(R.layout.image_fragment, container, false);
34 | init(view);
35 |
36 | return view;
37 | }
38 |
39 | private void init(@NonNull final View view) {
40 | final ImageView imageView = (ImageView) view.findViewById(R.id.image);
41 |
42 | switch (getArguments().getInt(sARGUMENT_IMAGE_CODE)) {
43 | case 0:
44 | imageView.setImageDrawable
45 | (ContextCompat.getDrawable(getActivity(), R.drawable.neo));
46 | break;
47 |
48 | case 1:
49 | imageView.setImageDrawable
50 | (ContextCompat.getDrawable(getActivity(), R.drawable.morpheus));
51 | break;
52 |
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-land-nodpi/morpheus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/drawable-land-nodpi/morpheus.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-land-nodpi/neo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/drawable-land-nodpi/neo.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-land-nodpi/persephone.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/drawable-land-nodpi/persephone.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/Neo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/drawable-nodpi/Neo.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/drawable-nodpi/code.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/image_nav_drawer_account_background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/drawable-nodpi/image_nav_drawer_account_background.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/keymaker.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/drawable-nodpi/keymaker.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/morpheus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/drawable-nodpi/morpheus.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/persephone.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/drawable-nodpi/persephone.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/nav_drawer_header_foreground.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_account_circle_white_64dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_explore_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_help_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_home_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_info_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/nav_drawer_header_foreground.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-v21/toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/about_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/account_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/help_and_feddback_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/image_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/main_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
15 |
16 |
17 |
18 |
22 |
23 |
24 |
25 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/navigation_drawer_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
17 |
18 |
25 |
26 |
27 |
28 |
39 |
40 |
46 |
47 |
52 |
53 |
57 |
58 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/navigation_drawer_body.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 320dp
5 |
6 | 24dp
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | @color/blue_500
7 | @color/blue_700
8 | @color/text_black_primary
9 |
10 |
11 | @color/black_87
12 |
13 | @color/white
14 |
15 |
16 | #2196f3
17 | #1976D2
18 |
19 |
20 | #FFF
21 | #66000000
22 | #99000000
23 |
24 | #DE000000
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 280dp
5 |
6 | 8dp
7 | 56dp
8 | 16dp
9 | 64dp
10 |
11 | 4dp
12 | 16dp
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Nav Drawer
4 |
5 |
6 | Home
7 | Explore
8 | About
9 | Account
10 | Help&Feedback
11 |
12 |
13 | Home
14 | Explore
15 |
16 | About
17 | Sotti
18 | sotti@sottocorp.com
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/web_hi_res_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/res/web_hi_res_512.png
--------------------------------------------------------------------------------
/app/src/main/web_hi_res_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/app/src/main/web_hi_res_512.png
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.0.0-alpha3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
10 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
11 | org.gradle.jvmargs=-Xmx4096m
12 | # When configured, Gradle will run in incubating parallel mode.
13 | # This option should only be used with decoupled projects. More details, visit
14 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
15 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sottti/Material-Design-Nav-Drawer/46fb2012e323340c21dadefb6c05d7692167f55a/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Jun 04 10:48:32 BST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-milestone-2-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------