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 @@ + + + - + 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" />