Skip to content

Commit

Permalink
Merge pull request #22 from cleanOK/master
Browse files Browse the repository at this point in the history
dependencies and readme updated
  • Loading branch information
dmytroDenysenko authored Oct 18, 2016
2 parents 2d22d01 + e31d9f5 commit 2bedf41
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 16 deletions.
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,36 @@ Also, read how it was done in [our blog] (https://yalantis.com/blog/how-we-devel

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

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

2. Your hamburger on navigation menu must have exactly same coordinates as hamburger on ActionBar.
~~~
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
3. In your `onCreate` method you need to config and build animation with GuillotineAnimation.GuillotineBuilder
~~~
2. Add the dependency to your app build.gradle
~~~
dependencies {
compile 'com.github.Yalantis:GuillotineMenu-Android:1.2'
}
~~~
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.
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
```java
new GuillotineAnimation.GuillotineBuilder(guillotineMenu, guillotineMenu.findViewById(R.id.guillotine_hamburger), contentHamburger)
.setActionBarViewForAnimation(toolbar)
.build();
```
Here `setActionBarViewForAnimation` method enables bounce effect of ActionBar at the end of the guillotine closing animation.
Here `setActionBarViewForAnimation` method enables bounce effect of Toolbar at the end of the guillotine closing animation.
# Misc
Expand Down
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

android {
compileSdkVersion 23
compileSdkVersion 24
buildToolsVersion "23.0.3"

defaultConfig {
applicationId "com.yalantis.guillotine.sample"
minSdkVersion 15
targetSdkVersion 23
versionCode 2
versionName "1.1"
targetSdkVersion 24
versionCode 3
versionName "1.2"
}
buildTypes {
release {
Expand All @@ -32,7 +32,7 @@ android {
dependencies {
compile project(':library')
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.jakewharton:butterknife:8.0.1'
apt 'com.jakewharton:butterknife-compiler:8.0.1'
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.android.tools.build:gradle:2.2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed May 11 18:02:43 EEST 2016
#Mon Oct 10 13:48:17 EEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
8 changes: 4 additions & 4 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 23
compileSdkVersion 24
buildToolsVersion "23.0.3"

defaultConfig {
minSdkVersion 15
targetSdkVersion 23
versionCode 2
versionName "1.1"
targetSdkVersion 24
versionCode 3
versionName "1.2"
}
buildTypes {
release {
Expand Down

0 comments on commit 2bedf41

Please sign in to comment.