diff --git a/README.md b/README.md index 6bfe00a..0762f53 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/app/build.gradle b/app/build.gradle index 2133849..0aad11f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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 { @@ -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' } \ No newline at end of file diff --git a/build.gradle b/build.gradle index f6e9073..573f4fd 100644 --- a/build.gradle +++ b/build.gradle @@ -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 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0508994..7a59ff4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/library/build.gradle b/library/build.gradle index d6e162e..8ba9873 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -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 {