Skip to content

Commit 90bbf8f

Browse files
authored
Merge pull request #84 from Yalantis/fix/updateComponents
Updated target versions
2 parents c2cf936 + b257076 commit 90bbf8f

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

app/build.gradle

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ repositories {
55
}
66
}
77
android {
8-
compileSdkVersion 23
9-
buildToolsVersion "23.0.2"
8+
compileSdkVersion 28
9+
buildToolsVersion "28.0.3"
1010

1111
defaultConfig {
12-
minSdkVersion 15
13-
targetSdkVersion 23
12+
minSdkVersion 16
13+
targetSdkVersion 28
1414
versionCode 1
1515
versionName "1.0"
1616
}
@@ -23,8 +23,8 @@ android {
2323
}
2424

2525
dependencies {
26-
compile project(':library')
27-
compile fileTree(dir: 'libs', include: ['*.jar'])
28-
compile 'com.android.support:appcompat-v7:23.1.1'
29-
compile 'com.github.ozodrukh:CircularReveal:1.0.4'
26+
implementation project(':library')
27+
implementation fileTree(dir: 'libs', include: ['*.jar'])
28+
implementation 'com.android.support:appcompat-v7:28.0.0'
29+
implementation 'com.github.ozodrukh:CircularReveal:2.1.0'
3030
}

app/src/main/java/yalantis/com/sidemenu/sample/MainActivity.java

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package yalantis.com.sidemenu.sample;
22

3+
import android.animation.Animator;
34
import android.content.res.Configuration;
45
import android.graphics.Color;
56
import android.graphics.drawable.BitmapDrawable;
@@ -17,7 +18,6 @@
1718
import java.util.ArrayList;
1819
import java.util.List;
1920

20-
import io.codetail.animation.SupportAnimator;
2121
import io.codetail.animation.ViewAnimationUtils;
2222
import yalantis.com.sidemenu.interfaces.Resourceble;
2323
import yalantis.com.sidemenu.interfaces.ScreenShotable;
@@ -30,7 +30,6 @@ public class MainActivity extends AppCompatActivity implements ViewAnimator.View
3030
private DrawerLayout drawerLayout;
3131
private ActionBarDrawerToggle drawerToggle;
3232
private List<SlideMenuItem> list = new ArrayList<>();
33-
private ContentFragment contentFragment;
3433
private ViewAnimator viewAnimator;
3534
private int res = R.drawable.content_music;
3635
private LinearLayout linearLayout;
@@ -40,13 +39,13 @@ public class MainActivity extends AppCompatActivity implements ViewAnimator.View
4039
protected void onCreate(Bundle savedInstanceState) {
4140
super.onCreate(savedInstanceState);
4241
setContentView(R.layout.activity_main);
43-
contentFragment = ContentFragment.newInstance(R.drawable.content_music);
42+
ContentFragment contentFragment = ContentFragment.newInstance(R.drawable.content_music);
4443
getSupportFragmentManager().beginTransaction()
4544
.replace(R.id.content_frame, contentFragment)
4645
.commit();
47-
drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
46+
drawerLayout = findViewById(R.id.drawer_layout);
4847
drawerLayout.setScrimColor(Color.TRANSPARENT);
49-
linearLayout = (LinearLayout) findViewById(R.id.left_drawer);
48+
linearLayout = findViewById(R.id.left_drawer);
5049
linearLayout.setOnClickListener(new View.OnClickListener() {
5150
@Override
5251
public void onClick(View v) {
@@ -81,7 +80,7 @@ private void createMenuList() {
8180

8281

8382
private void setActionBar() {
84-
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
83+
Toolbar toolbar = findViewById(R.id.toolbar);
8584
setSupportActionBar(toolbar);
8685
getSupportActionBar().setHomeButtonEnabled(true);
8786
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
@@ -112,7 +111,7 @@ public void onDrawerOpened(View drawerView) {
112111
super.onDrawerOpened(drawerView);
113112
}
114113
};
115-
drawerLayout.setDrawerListener(drawerToggle);
114+
drawerLayout.addDrawerListener(drawerToggle);
116115
}
117116

118117
@Override
@@ -151,11 +150,11 @@ private ScreenShotable replaceFragment(ScreenShotable screenShotable, int topPos
151150
this.res = this.res == R.drawable.content_music ? R.drawable.content_films : R.drawable.content_music;
152151
View view = findViewById(R.id.content_frame);
153152
int finalRadius = Math.max(view.getWidth(), view.getHeight());
154-
SupportAnimator animator = ViewAnimationUtils.createCircularReveal(view, 0, topPosition, 0, finalRadius);
153+
Animator animator = ViewAnimationUtils.createCircularReveal(view, 0, topPosition, 0, finalRadius);
155154
animator.setInterpolator(new AccelerateInterpolator());
156155
animator.setDuration(ViewAnimator.CIRCULAR_REVEAL_ANIMATION_DURATION);
157156

158-
findViewById(R.id.content_overlay).setBackgroundDrawable(new BitmapDrawable(getResources(), screenShotable.getBitmap()));
157+
findViewById(R.id.content_overlay).setBackground(new BitmapDrawable(getResources(), screenShotable.getBitmap()));
159158
animator.start();
160159
ContentFragment contentFragment = ContentFragment.newInstance(this.res);
161160
getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, contentFragment).commit();

build.gradle

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
buildscript {
44
repositories {
55
jcenter()
6+
google()
67
}
78
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.3'
9+
classpath 'com.android.tools.build:gradle:3.3.0'
910
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
1011

1112
// NOTE: Do not place your application dependencies here; they belong
@@ -21,6 +22,7 @@ allprojects {
2122
group = GROUP
2223
repositories {
2324
jcenter()
25+
google()
2426
}
2527
}
2628
apply plugin: 'android-reporting'
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Jan 05 16:16:16 EET 2017
1+
#Thu Jan 31 15:40:02 EET 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

library/build.gradle

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
3-
group='com.yalantis:sidemenu'
43

54
android {
6-
compileSdkVersion 23
7-
buildToolsVersion "23.0.2"
5+
compileSdkVersion 28
6+
buildToolsVersion "28.0.3"
87

98
defaultConfig {
109
minSdkVersion 15
11-
targetSdkVersion 23
10+
targetSdkVersion 28
1211
versionCode 1
1312
versionName "1.0"
1413
}
@@ -20,7 +19,7 @@ android {
2019
}
2120
}
2221
dependencies {
23-
compile 'com.android.support:appcompat-v7:23.1.1'
22+
implementation 'com.android.support:appcompat-v7:28.0.0'
2423
}
2524

2625
task androidJavadocs(type: Javadoc) {

0 commit comments

Comments
 (0)