Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update project #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Neat library, that provides a simple way to implement guillotine-styled animatio

Check this [project on Dribbble] (https://dribbble.com/shots/2018249-Guillotine-Menu)

Also, read how it was done in [our blog] (https://yalantis.com/blog/how-we-developed-the-guillotine-menu-animation-for-android/?utm_source=github)

<img src="https://d13yacurqjgara.cloudfront.net/users/495792/screenshots/2113314/draft-03.gif" alt="Guillotine animation gif" style="width:800;height:600">


Expand All @@ -35,7 +33,7 @@ Also, read how it was done in [our blog] (https://yalantis.com/blog/how-we-devel

~~~
dependencies {
compile 'com.github.Yalantis:GuillotineMenu-Android:1.2'
implementation 'com.github.Yalantis:GuillotineMenu-Android:1.3'
}
~~~

Expand All @@ -60,16 +58,21 @@ Builder allows you to customize start delay, duration, interpolation and you can

# Changelog

### Version: 1.0
### Version: 1.3

* Update dependencies
* Migrate to AndroidX

* Initial Build

### Version: 1.2

* Moved to using Toolbar instead of ActionBar
* Updated Gradle versions
* Fixed bugs

### Version: 1.0

* Initial Build

#### Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the animation.
Expand Down
24 changes: 13 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,33 @@ buildscript {
}

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
compileSdkVersion 33
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.yalantis.guillotine.sample"
minSdkVersion 15
targetSdkVersion 24
versionCode 3
versionName "1.2"
targetSdkVersion 33
versionCode 4
versionName "1.3"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

buildFeatures {
viewBinding true
}
}

dependencies {
compile project(':library')
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.jakewharton:butterknife:8.0.1'
apt 'com.jakewharton:butterknife-compiler:8.0.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':library')

implementation "androidx.appcompat:appcompat:1.5.1"
}
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

<activity
android:name=".activity.MainActivity"
android:screenOrientation="portrait">
android:screenOrientation="portrait"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
package com.yalantis.guillotine.sample.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;

import androidx.appcompat.app.AppCompatActivity;

import com.yalantis.guillotine.animation.GuillotineAnimation;
import com.yalantis.guillotine.sample.R;

import butterknife.ButterKnife;
import butterknife.BindView;
import com.yalantis.guillotine.sample.databinding.ActivityMainBinding;

/**
* Created by Dmytro Denysenko on 5/4/15.
Expand All @@ -20,31 +17,24 @@ public class MainActivity extends AppCompatActivity {
private static final long RIPPLE_DURATION = 250;


@BindView(R.id.toolbar)
Toolbar toolbar;
@BindView(R.id.root)
FrameLayout root;
@BindView(R.id.content_hamburger)
View contentHamburger;
private ActivityMainBinding binding;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity);
ButterKnife.bind(this);
binding = ActivityMainBinding.inflate(getLayoutInflater());
setContentView(binding.root);


if (toolbar != null) {
setSupportActionBar(toolbar);
getSupportActionBar().setTitle(null);
}
setSupportActionBar(binding.toolbar);
getSupportActionBar().setTitle(null);

View guillotineMenu = LayoutInflater.from(this).inflate(R.layout.guillotine, null);
root.addView(guillotineMenu);
binding.root.addView(guillotineMenu);

new GuillotineAnimation.GuillotineBuilder(guillotineMenu, guillotineMenu.findViewById(R.id.guillotine_hamburger), contentHamburger)
new GuillotineAnimation.GuillotineBuilder(guillotineMenu, guillotineMenu.findViewById(R.id.guillotine_hamburger), binding.contentHamburger)
.setStartDelay(RIPPLE_DURATION)
.setActionBarViewForAnimation(toolbar)
.setActionBarViewForAnimation(binding.toolbar)
.setClosedOnStart(true)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;

import androidx.appcompat.widget.AppCompatTextView;

import com.yalantis.guillotine.sample.App;

/**
* Created by Dmytro Denysenko on 5/6/15.
*/
public class CanaroTextView extends TextView {
public class CanaroTextView extends AppCompatTextView {
public CanaroTextView(Context context) {
this(context, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:layout_height="match_parent"
android:orientation="vertical">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
app:contentInsetStart="0dp"
style="@style/Toolbar">
Expand All @@ -34,7 +34,7 @@
android:layout_gravity="center"
android:text="@string/activity"
android:textSize="@dimen/guillotine_item_text_size" />
</android.support.v7.widget.Toolbar>
</androidx.appcompat.widget.Toolbar>

<ImageView
style="@style/ImageView.ContentItem"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/guillotine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
android:background="@color/guillotine_background"
android:orientation="vertical">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
style="@style/Toolbar"
app:contentInsetStart="0dp">

<ImageView
android:id="@+id/guillotine_hamburger"
style="@style/ImageView.Hamburger"
android:src="@drawable/ic_menu" />
</android.support.v7.widget.Toolbar>
</androidx.appcompat.widget.Toolbar>

<LinearLayout
android:id="@+id/profile_group"
Expand Down
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

buildscript {
repositories {
jcenter()
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
classpath 'com.android.tools.build:gradle:7.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -14,6 +15,7 @@ buildscript {

allprojects {
repositories {
jcenter()
google()
mavenCentral()
}
}
6 changes: 5 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.parallel=true

android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Oct 10 13:48:17 EEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
12 changes: 6 additions & 6 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 24
buildToolsVersion "23.0.3"
compileSdkVersion 33
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 15
targetSdkVersion 24
versionCode 3
versionName "1.2"
targetSdkVersion 33
versionCode 4
versionName "1.3"
}
buildTypes {
release {
Expand All @@ -19,5 +19,5 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.jar'])
}