Skip to content

Commit

Permalink
- Updated the targetSdkVersion
Browse files Browse the repository at this point in the history
- Refactored code
-
  • Loading branch information
Shashank02051997 committed Jul 28, 2022
1 parent d128789 commit 411123f
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions .idea/runConfigurations.xml

This file was deleted.

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
}
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />

<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Click Me too!" />
</LinearLayout>
7 changes: 1 addition & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
google()
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
}
}

Expand Down
5 changes: 2 additions & 3 deletions fancygifdialoglib/build.gradle
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 411123f

Please sign in to comment.