Skip to content

Commit e31d9f5

Browse files
readme updated
1 parent 4c1649e commit e31d9f5

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,36 @@ Also, read how it was done in [our blog] (https://yalantis.com/blog/how-we-devel
1919

2020
*For a working implementation, have a look at the app module*
2121

22-
1. Include the library as local library project.
22+
1. Add JitPack repository in your root build.gradle at the end of repositories:
2323

24-
2. Your hamburger on navigation menu must have exactly same coordinates as hamburger on ActionBar.
24+
~~~
25+
allprojects {
26+
repositories {
27+
...
28+
maven { url "https://jitpack.io" }
29+
}
30+
}
2531
26-
3. In your `onCreate` method you need to config and build animation with GuillotineAnimation.GuillotineBuilder
32+
~~~
33+
34+
2. Add the dependency to your app build.gradle
35+
36+
~~~
37+
dependencies {
38+
compile 'com.github.Yalantis:GuillotineMenu-Android:1.2'
39+
}
40+
~~~
41+
42+
3. You need to create a layout for the navigation menu (`guillotine.xml` in sample app), which will later open and close guillotine-style. The only tricky part here is that the navigation layout should be on top of any other content and will disappear after closing animation ends. That is why content layout (`activity.xml` in sample app) should also have hamburger icon at the same coordinates as navigation menu has.
43+
44+
4. After that all you need to do is to build animation by passing navigation layout object, navigation and content layout hamburger objects to `GuillotineAnimation.GuillotineBuilder` in your `onCreate` method
2745
2846
```java
2947
new GuillotineAnimation.GuillotineBuilder(guillotineMenu, guillotineMenu.findViewById(R.id.guillotine_hamburger), contentHamburger)
3048
.setActionBarViewForAnimation(toolbar)
3149
.build();
3250
```
33-
Here `setActionBarViewForAnimation` method enables bounce effect of ActionBar at the end of the guillotine closing animation.
51+
Here `setActionBarViewForAnimation` method enables bounce effect of Toolbar at the end of the guillotine closing animation.
3452
3553
# Misc
3654

0 commit comments

Comments
 (0)