From 0c516f8a4f1b485bfedb80fcc1cd43c287487cba Mon Sep 17 00:00:00 2001 From: kirill Date: Thu, 31 Jan 2019 15:46:14 +0200 Subject: [PATCH 1/2] Updated target versions --- app/build.gradle | 14 +++++++------- build.gradle | 4 +++- gradle/wrapper/gradle-wrapper.properties | 4 ++-- library/build.gradle | 9 ++++----- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 11dd2af..084b9ba 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,12 +5,12 @@ repositories { } } android { - compileSdkVersion 23 - buildToolsVersion "23.0.2" + compileSdkVersion 28 + buildToolsVersion "28.0.3" defaultConfig { minSdkVersion 15 - targetSdkVersion 23 + targetSdkVersion 28 versionCode 1 versionName "1.0" } @@ -23,8 +23,8 @@ android { } dependencies { - compile project(':library') - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.1.1' - compile 'com.github.ozodrukh:CircularReveal:1.0.4' + implementation project(':library') + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.github.ozodrukh:CircularReveal:1.0.4' } diff --git a/build.gradle b/build.gradle index 92247be..3a3193f 100644 --- a/build.gradle +++ b/build.gradle @@ -3,9 +3,10 @@ buildscript { repositories { jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:2.2.3' + classpath 'com.android.tools.build:gradle:3.3.0' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' // NOTE: Do not place your application dependencies here; they belong @@ -21,6 +22,7 @@ allprojects { group = GROUP repositories { jcenter() + google() } } apply plugin: 'android-reporting' \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1a5c027..abb087f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Jan 05 16:16:16 EET 2017 +#Thu Jan 31 15:40:02 EET 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip diff --git a/library/build.gradle b/library/build.gradle index d466597..8f292ea 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,14 +1,13 @@ apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' -group='com.yalantis:sidemenu' android { - compileSdkVersion 23 - buildToolsVersion "23.0.2" + compileSdkVersion 28 + buildToolsVersion "28.0.3" defaultConfig { minSdkVersion 15 - targetSdkVersion 23 + targetSdkVersion 28 versionCode 1 versionName "1.0" } @@ -20,7 +19,7 @@ android { } } dependencies { - compile 'com.android.support:appcompat-v7:23.1.1' + implementation 'com.android.support:appcompat-v7:28.0.0' } task androidJavadocs(type: Javadoc) { From b25707647e0b7df8033526e95e5e558296a76963 Mon Sep 17 00:00:00 2001 From: kirill Date: Thu, 31 Jan 2019 15:59:49 +0200 Subject: [PATCH 2/2] Reveal version update and deprecated methods removed --- app/build.gradle | 4 ++-- .../com/sidemenu/sample/MainActivity.java | 17 ++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 084b9ba..2cf63e3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,7 @@ android { buildToolsVersion "28.0.3" defaultConfig { - minSdkVersion 15 + minSdkVersion 16 targetSdkVersion 28 versionCode 1 versionName "1.0" @@ -26,5 +26,5 @@ dependencies { implementation project(':library') implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.github.ozodrukh:CircularReveal:1.0.4' + implementation 'com.github.ozodrukh:CircularReveal:2.1.0' } diff --git a/app/src/main/java/yalantis/com/sidemenu/sample/MainActivity.java b/app/src/main/java/yalantis/com/sidemenu/sample/MainActivity.java index 8fe894f..59aafda 100644 --- a/app/src/main/java/yalantis/com/sidemenu/sample/MainActivity.java +++ b/app/src/main/java/yalantis/com/sidemenu/sample/MainActivity.java @@ -1,5 +1,6 @@ package yalantis.com.sidemenu.sample; +import android.animation.Animator; import android.content.res.Configuration; import android.graphics.Color; import android.graphics.drawable.BitmapDrawable; @@ -17,7 +18,6 @@ import java.util.ArrayList; import java.util.List; -import io.codetail.animation.SupportAnimator; import io.codetail.animation.ViewAnimationUtils; import yalantis.com.sidemenu.interfaces.Resourceble; import yalantis.com.sidemenu.interfaces.ScreenShotable; @@ -30,7 +30,6 @@ public class MainActivity extends AppCompatActivity implements ViewAnimator.View private DrawerLayout drawerLayout; private ActionBarDrawerToggle drawerToggle; private List list = new ArrayList<>(); - private ContentFragment contentFragment; private ViewAnimator viewAnimator; private int res = R.drawable.content_music; private LinearLayout linearLayout; @@ -40,13 +39,13 @@ public class MainActivity extends AppCompatActivity implements ViewAnimator.View protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - contentFragment = ContentFragment.newInstance(R.drawable.content_music); + ContentFragment contentFragment = ContentFragment.newInstance(R.drawable.content_music); getSupportFragmentManager().beginTransaction() .replace(R.id.content_frame, contentFragment) .commit(); - drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); + drawerLayout = findViewById(R.id.drawer_layout); drawerLayout.setScrimColor(Color.TRANSPARENT); - linearLayout = (LinearLayout) findViewById(R.id.left_drawer); + linearLayout = findViewById(R.id.left_drawer); linearLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -81,7 +80,7 @@ private void createMenuList() { private void setActionBar() { - Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); + Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setHomeButtonEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true); @@ -112,7 +111,7 @@ public void onDrawerOpened(View drawerView) { super.onDrawerOpened(drawerView); } }; - drawerLayout.setDrawerListener(drawerToggle); + drawerLayout.addDrawerListener(drawerToggle); } @Override @@ -151,11 +150,11 @@ private ScreenShotable replaceFragment(ScreenShotable screenShotable, int topPos this.res = this.res == R.drawable.content_music ? R.drawable.content_films : R.drawable.content_music; View view = findViewById(R.id.content_frame); int finalRadius = Math.max(view.getWidth(), view.getHeight()); - SupportAnimator animator = ViewAnimationUtils.createCircularReveal(view, 0, topPosition, 0, finalRadius); + Animator animator = ViewAnimationUtils.createCircularReveal(view, 0, topPosition, 0, finalRadius); animator.setInterpolator(new AccelerateInterpolator()); animator.setDuration(ViewAnimator.CIRCULAR_REVEAL_ANIMATION_DURATION); - findViewById(R.id.content_overlay).setBackgroundDrawable(new BitmapDrawable(getResources(), screenShotable.getBitmap())); + findViewById(R.id.content_overlay).setBackground(new BitmapDrawable(getResources(), screenShotable.getBitmap())); animator.start(); ContentFragment contentFragment = ContentFragment.newInstance(this.res); getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, contentFragment).commit();