You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 17, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@
29
29
<aname="introduction"></a>
30
30
## Introduction
31
31
**MaterialNavigationView** library is built upon Google's Material Design library. This API will be useful to create rich, animated, beautiful Navigation View Drawer in Android app easily.
32
-
It follows all Material Design Guidelines as stated [here](https://material.io) <br>
32
+
It follows all Material Design Guidelines as stated [here](https://material.io). <br>
33
33
`MaterialNavigationView` class in this library is inherited from [`com.google.android.material.navigation.NavigationView`](https://github.com/material-components/material-components-android/blob/master/docs/components/NavigationView.md) class. Just only difference is added extra design. <br>
34
34
So, we can use it as it is.
35
35
@@ -52,8 +52,8 @@ dependencies {
52
52
}
53
53
```
54
54
#### Set up Material Theme
55
-
Setting Material Theme to app is necessary before implementing Material Navigation View library. To set it up, update [`styles.xml`](app\src\main\res\values\styles.xml) of `values` directory in app.
56
-
`colorSecondary` value is important here because this color is applied to menu item of Navigation View.
55
+
Setting Material Theme to app is necessary before implementing Material Navigation View library. To set it up, update [`styles.xml`](/app/src/main/res/values/styles.xml) of `values` directory in app.
56
+
**`colorSecondary` value is important here because this color is applied to menu item of Navigation View.**
-`getItemStyle()` : It returns the value of item style of menu.
134
+
-***`getItemStyle()`*** : It returns the value of item style of menu.
132
135
133
136
Here is a demo of `MaterialNavigationView` in which we will switch item style of NavigationView after selecting menu.
134
137
@@ -157,6 +160,7 @@ class MainActivity : AppCompatActivity() {
157
160
}
158
161
159
162
```
163
+
Thus, we have implemented `MaterialNavigationView`.
160
164
161
165
<aname="migrate"></a>
162
166
## Migrating from `NavigationView`
@@ -165,7 +169,7 @@ Do following Changes:
165
169
- Change in layout file - Just change package of component from `com.google.android.material.navigation.NavigationView` to `com.shreyaspatil.material.navigationview.MaterialNavigationView` wherever you used it.
166
170
- Change in Activity Code - Just change `NavigationView` class to `MaterialNavigationView` and import appropriate package.
167
171
168
-
:confetti_ball: Hurrah! you are done and successfully migrated to `MaterialNavigationView`. Now just run your app and see magic.
172
+
:fire: Hurrah! you are done and successfully migrated to `MaterialNavigationView`. Now just *run your app and see magic*.
169
173
<aname="credits"></a>
170
174
171
175
<aname="fastImplementation"></a>
@@ -179,4 +183,4 @@ Then Change just package in layout file and class name in Activity code file and
179
183
This library is built using following open-source libraries.
180
184
-[Material Components for Android](https://github.com/material-components/material-components-android)
181
185
182
-
If you like this library, Please start this repo and share with someone who need it. You can contribute if you have any suggestions or ideas to improve it.
186
+
If you like this library, Please start this repo and share with someone who need it. You can contribute if you have any suggestions or ideas to improve it.
0 commit comments