Skip to content

Commit

Permalink
Merge pull request #84 from Yalantis/fix/updateComponents
Browse files Browse the repository at this point in the history
Updated target versions
  • Loading branch information
PenzK authored Jan 31, 2019
2 parents c2cf936 + b257076 commit 90bbf8f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
16 changes: 8 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ repositories {
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
compileSdkVersion 28
buildToolsVersion "28.0.3"

defaultConfig {
minSdkVersion 15
targetSdkVersion 23
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
Expand All @@ -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:2.1.0'
}
17 changes: 8 additions & 9 deletions app/src/main/java/yalantis/com/sidemenu/sample/MainActivity.java
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand All @@ -30,7 +30,6 @@ public class MainActivity extends AppCompatActivity implements ViewAnimator.View
private DrawerLayout drawerLayout;
private ActionBarDrawerToggle drawerToggle;
private List<SlideMenuItem> list = new ArrayList<>();
private ContentFragment contentFragment;
private ViewAnimator viewAnimator;
private int res = R.drawable.content_music;
private LinearLayout linearLayout;
Expand All @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -112,7 +111,7 @@ public void onDrawerOpened(View drawerView) {
super.onDrawerOpened(drawerView);
}
};
drawerLayout.setDrawerListener(drawerToggle);
drawerLayout.addDrawerListener(drawerToggle);
}

@Override
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,6 +22,7 @@ allprojects {
group = GROUP
repositories {
jcenter()
google()
}
}
apply plugin: 'android-reporting'
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 @@
#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
9 changes: 4 additions & 5 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
}
Expand All @@ -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) {
Expand Down

0 comments on commit 90bbf8f

Please sign in to comment.