diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index fb7f4a8..61a9130 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 9b0cbb7..66b7cb2 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -4,10 +4,10 @@
diff --git a/.idea/misc.xml b/.idea/misc.xml
index f6433fa..ae51f8b 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,11 +1,19 @@
+
+
+
+
+
-
+
@@ -18,12 +26,13 @@
+
-
+
@@ -35,11 +44,12 @@
+
-
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
index f6d9c1d..e34e8c7 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -4,7 +4,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
deleted file mode 100644
index e497da9..0000000
--- a/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index f2aeb6b..8e244e8 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'
android {
- compileSdkVersion 30
+ compileSdkVersion 31
defaultConfig {
applicationId "com.shashank.sony.fancygifdialoglibrary"
minSdkVersion 21
- targetSdkVersion 30
+ targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 8e35ee5..0fc5cc0 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -9,7 +9,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
-
+
diff --git a/app/src/main/java/com/shashank/sony/fancygifdialoglibrary/MainActivity.java b/app/src/main/java/com/shashank/sony/fancygifdialoglibrary/MainActivity.java
index d49b9ee..db18ef5 100644
--- a/app/src/main/java/com/shashank/sony/fancygifdialoglibrary/MainActivity.java
+++ b/app/src/main/java/com/shashank/sony/fancygifdialoglibrary/MainActivity.java
@@ -42,18 +42,8 @@ public void onClick(View view) {
.setNegativeBtnBackground(R.color.negativeButton)
.setGifResource(R.drawable.gif1)
.isCancellable(true)
- .OnPositiveClicked(new FancyGifDialogListener() {
- @Override
- public void OnClick() {
- toaster("ok");
- }
- })
- .OnNegativeClicked(new FancyGifDialogListener() {
- @Override
- public void OnClick() {
- toaster("cancel");
- }
- })
+ .OnPositiveClicked(() -> toaster("ok"))
+ .OnNegativeClicked(() -> toaster("cancel"))
.build();
break;
case R.id.button2:
@@ -68,24 +58,9 @@ public void OnClick() {
.setNegativeBtnBackground(R.color.negativeButton)
.setGifResource(R.drawable.gif1)
.isCancellable(true)
- .setOnCancelListener(new DialogInterface.OnCancelListener() {
- @Override
- public void onCancel(DialogInterface dialogInterface) {
- toaster("Cancelled");
- }
- })
- .OnPositiveClicked(new FancyGifDialogListener() {
- @Override
- public void OnClick() {
- toaster("Ok");
- }
- })
- .OnNegativeClicked(new FancyGifDialogListener() {
- @Override
- public void OnClick() {
- toaster("Cancel");
- }
- })
+ .setOnCancelListener(dialogInterface -> toaster("Cancelled"))
+ .OnPositiveClicked(() -> toaster("Ok"))
+ .OnNegativeClicked(() -> toaster("Cancel"))
.build();
break;
}
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index f16d309..6142c69 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -12,15 +12,11 @@
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:layout_centerVertical="true"
android:text="Click Me" />
diff --git a/build.gradle b/build.gradle
index 6fb0518..eb61952 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,3 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
buildscript {
repositories {
@@ -7,11 +5,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.0.2'
+ classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
}
}
diff --git a/fancygifdialoglib/build.gradle b/fancygifdialoglib/build.gradle
index 2e2e60f..d789e34 100644
--- a/fancygifdialoglib/build.gradle
+++ b/fancygifdialoglib/build.gradle
@@ -1,13 +1,12 @@
apply plugin: 'com.android.library'
-apply plugin: 'com.github.dcendents.android-maven'
group = 'com.github.Shashank02051997'
android {
- compileSdkVersion 30
+ compileSdkVersion 31
defaultConfig {
minSdkVersion 15
- targetSdkVersion 30
+ targetSdkVersion 31
versionCode 1
versionName "1.0"
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index a5fa786..a033971 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip