Skip to content

Commit e3338c6

Browse files
authored
Merge pull request #60 from PatilShreyas/version-2.2.3-dev
Release v2.2.3
2 parents edce289 + 48967dc commit e3338c6

9 files changed

Lines changed: 57 additions & 74 deletions

File tree

MaterialDialogLibrary/build.gradle

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.vanniktech.maven.publish'
23

34
android {
4-
compileSdkVersion 30
5+
compileSdkVersion 31
56

67
defaultConfig {
78
minSdkVersion 19
8-
targetSdkVersion 30
9-
versionCode 2
10-
versionName VERSION_NAME
11-
9+
targetSdkVersion 31
1210
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1311

1412
}
@@ -20,23 +18,27 @@ android {
2018
}
2119
}
2220

21+
compileOptions {
22+
sourceCompatibility JavaVersion.VERSION_1_8
23+
targetCompatibility JavaVersion.VERSION_1_8
24+
}
25+
2326
}
2427

2528
dependencies {
2629
implementation fileTree(dir: 'libs', include: ['*.jar'])
27-
implementation 'androidx.appcompat:appcompat:1.2.0'
28-
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
29-
implementation 'androidx.annotation:annotation:1.2.0'
30+
implementation 'androidx.appcompat:appcompat:1.4.0'
31+
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
32+
implementation 'androidx.annotation:annotation:1.3.0'
3033

3134
// Material Design Library
32-
implementation 'com.google.android.material:material:1.3.0'
35+
implementation 'com.google.android.material:material:1.4.0'
3336

3437
// Lottie Animation Library
35-
implementation 'com.airbnb.android:lottie:3.7.0'
38+
implementation 'com.airbnb.android:lottie:4.2.2'
3639

37-
testImplementation 'junit:junit:4.12'
38-
androidTestImplementation 'androidx.test:runner:1.2.0'
39-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
40+
testImplementation 'junit:junit:4.13.2'
41+
androidTestImplementation 'androidx.test:runner:1.4.0'
42+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
4043
}
4144

42-
apply plugin: 'com.vanniktech.maven.publish'

MaterialDialogLibrary/src/main/java/dev/shreyaspatil/MaterialDialog/AbstractDialog.java

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package dev.shreyaspatil.MaterialDialog;
22

3+
import android.annotation.SuppressLint;
34
import android.app.Activity;
45
import android.app.Dialog;
56
import android.content.res.ColorStateList;
@@ -74,6 +75,7 @@ protected AbstractDialog(@NonNull Activity mActivity,
7475
this.mAnimationFile = mAnimationFile;
7576
}
7677

78+
@SuppressLint("WrongConstant")
7779
protected View createView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container) {
7880
// Inflate and set the layout for the dialog
7981
// Pass null as the parent view because its going in the dialog layout
@@ -113,12 +115,9 @@ protected View createView(@NonNull LayoutInflater inflater, @Nullable ViewGroup
113115
mPositiveButtonView.setIcon(ContextCompat.getDrawable(mActivity, mPositiveButton.getIcon()));
114116
}
115117

116-
mPositiveButtonView.setOnClickListener(new View.OnClickListener() {
117-
@Override
118-
public void onClick(View view) {
119-
mPositiveButton.getOnClickListener().onClick(AbstractDialog.this, BUTTON_POSITIVE);
120-
}
121-
});
118+
mPositiveButtonView.setOnClickListener(view ->
119+
mPositiveButton.getOnClickListener().onClick(AbstractDialog.this, BUTTON_POSITIVE)
120+
);
122121
} else {
123122
mPositiveButtonView.setVisibility(View.INVISIBLE);
124123
}
@@ -131,12 +130,9 @@ public void onClick(View view) {
131130
mNegativeButtonView.setIcon(ContextCompat.getDrawable(mActivity, mNegativeButton.getIcon()));
132131
}
133132

134-
mNegativeButtonView.setOnClickListener(new View.OnClickListener() {
135-
@Override
136-
public void onClick(View view) {
137-
mNegativeButton.getOnClickListener().onClick(AbstractDialog.this, BUTTON_NEGATIVE);
138-
}
139-
});
133+
mNegativeButtonView.setOnClickListener(view ->
134+
mNegativeButton.getOnClickListener().onClick(AbstractDialog.this, BUTTON_NEGATIVE)
135+
);
140136
} else {
141137
mNegativeButtonView.setVisibility(View.INVISIBLE);
142138
}
@@ -270,12 +266,7 @@ public void dismiss() {
270266
public void setOnShowListener(@NonNull final OnShowListener onShowListener) {
271267
this.mOnShowListener = onShowListener;
272268

273-
mDialog.setOnShowListener(new android.content.DialogInterface.OnShowListener() {
274-
@Override
275-
public void onShow(android.content.DialogInterface dialogInterface) {
276-
showCallback();
277-
}
278-
});
269+
mDialog.setOnShowListener(dialogInterface -> showCallback());
279270
}
280271

281272
/**
@@ -284,12 +275,7 @@ public void onShow(android.content.DialogInterface dialogInterface) {
284275
public void setOnCancelListener(@NonNull final OnCancelListener onCancelListener) {
285276
this.mOnCancelListener = onCancelListener;
286277

287-
mDialog.setOnCancelListener(new android.content.DialogInterface.OnCancelListener() {
288-
@Override
289-
public void onCancel(android.content.DialogInterface dialogInterface) {
290-
cancelCallback();
291-
}
292-
});
278+
mDialog.setOnCancelListener(dialogInterface -> cancelCallback());
293279
}
294280

295281
/**
@@ -298,12 +284,7 @@ public void onCancel(android.content.DialogInterface dialogInterface) {
298284
public void setOnDismissListener(@NonNull final OnDismissListener onDismissListener) {
299285
this.mOnDismissListener = onDismissListener;
300286

301-
mDialog.setOnDismissListener(new android.content.DialogInterface.OnDismissListener() {
302-
@Override
303-
public void onDismiss(android.content.DialogInterface dialogInterface) {
304-
dismissCallback();
305-
}
306-
});
287+
mDialog.setOnDismissListener(dialogInterface -> dismissCallback());
307288
}
308289

309290
/**

MaterialDialogLibrary/src/main/java/dev/shreyaspatil/MaterialDialog/BottomSheetMaterialDialog.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import android.app.Activity;
44
import android.content.Context;
5-
import android.content.DialogInterface;
65
import android.graphics.Outline;
76
import android.os.Build;
87
import android.view.LayoutInflater;
@@ -65,16 +64,13 @@ public void getOutline(View view, Outline outline) {
6564
}
6665

6766
// Expand Bottom Sheet after showing.
68-
mDialog.setOnShowListener(new DialogInterface.OnShowListener() {
69-
@Override
70-
public void onShow(DialogInterface dialog) {
71-
BottomSheetDialog d = (BottomSheetDialog) dialog;
67+
mDialog.setOnShowListener(dialog -> {
68+
BottomSheetDialog d = (BottomSheetDialog) dialog;
7269

73-
FrameLayout bottomSheet = d.findViewById(com.google.android.material.R.id.design_bottom_sheet);
70+
FrameLayout bottomSheet = d.findViewById(com.google.android.material.R.id.design_bottom_sheet);
7471

75-
if (bottomSheet != null) {
76-
BottomSheetBehavior.from(bottomSheet).setState(BottomSheetBehavior.STATE_EXPANDED);
77-
}
72+
if (bottomSheet != null) {
73+
BottomSheetBehavior.from(bottomSheet).setState(BottomSheetBehavior.STATE_EXPANDED);
7874
}
7975
});
8076
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ repositories {
9191
dependencies {
9292
9393
// Material Dialog Library
94-
implementation 'dev.shreyaspatil.MaterialDialog:MaterialDialog:2.2.2'
94+
implementation 'dev.shreyaspatil.MaterialDialog:MaterialDialog:2.2.3'
9595
9696
// Material Design Library
9797
implementation 'com.google.android.material:material:1.0.0'

app/build.gradle

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 30
4+
compileSdkVersion 31
55
defaultConfig {
66
applicationId "com.shreyaspatil.MaterialDialogExample"
77
minSdkVersion 19
8-
targetSdkVersion 30
8+
targetSdkVersion 31
99
versionCode 1
1010
versionName "1.0"
1111
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -16,24 +16,29 @@ android {
1616
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
1717
}
1818
}
19+
20+
compileOptions {
21+
sourceCompatibility JavaVersion.VERSION_1_8
22+
targetCompatibility JavaVersion.VERSION_1_8
23+
}
1924
}
2025

2126
dependencies {
2227
implementation fileTree(dir: 'libs', include: ['*.jar'])
23-
implementation 'androidx.appcompat:appcompat:1.2.0'
24-
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
28+
implementation 'androidx.appcompat:appcompat:1.4.0'
29+
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
2530

2631
// Material Dialog Library
27-
implementation 'dev.shreyaspatil.MaterialDialog:MaterialDialog:2.2.2'
32+
implementation 'dev.shreyaspatil.MaterialDialog:MaterialDialog:2.2.3'
2833

2934
// Material Design Library
30-
implementation 'com.google.android.material:material:1.3.0'
35+
implementation 'com.google.android.material:material:1.4.0'
3136

3237
// Lottie Animation Library
33-
implementation 'com.airbnb.android:lottie:3.7.0'
38+
implementation 'com.airbnb.android:lottie:4.2.2'
3439

35-
testImplementation 'junit:junit:4.12'
36-
androidTestImplementation 'androidx.test:runner:1.2.0'
37-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
40+
testImplementation 'junit:junit:4.13.2'
41+
androidTestImplementation 'androidx.test:runner:1.4.0'
42+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
3843
// implementation project(path: ':MaterialDialogLibrary')
3944
}

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
android:supportsRtl="true"
1212
android:theme="@style/AppTheme"
1313
tools:ignore="GoogleAppIndexingWarning">
14-
<activity android:name=".MainActivity">
14+
<activity
15+
android:name=".MainActivity"
16+
android:exported="true">
1517
<intent-filter>
1618
<action android:name="android.intent.action.MAIN" />
1719

build.gradle

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@
33
buildscript {
44
repositories {
55
google()
6-
jcenter()
76
mavenCentral()
87
}
98
dependencies {
10-
classpath 'com.android.tools.build:gradle:4.1.3'
11-
12-
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.14.2'
9+
classpath 'com.android.tools.build:gradle:7.0.4'
10+
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'
1311
}
1412
}
1513

1614
allprojects {
1715
repositories {
1816
google()
19-
jcenter()
2017
mavenCentral()
2118
}
2219
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ android.enableJetifier=true
2020
# Maven Publish Details
2121
GROUP=dev.shreyaspatil.MaterialDialog
2222
POM_ARTIFACT_ID=MaterialDialog
23-
VERSION_NAME=2.2.2
23+
VERSION_NAME=2.2.3
2424
POM_NAME=MaterialDialog-Android
2525
POM_DESCRIPTION=Android Library to implement animated, beautiful, stylish Material Dialog in android apps easily.
2626
POM_INCEPTION_YEAR=2021
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Feb 12 18:52:11 IST 2021
1+
#Sat Jan 08 10:47:24 IST 2022
22
distributionBase=GRADLE_USER_HOME
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
34
distributionPath=wrapper/dists
4-
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
6+
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)