Skip to content

Commit

Permalink
- Updated the dependencies
Browse files Browse the repository at this point in the history
- Updated the targetSdkVersion
- Refactored code
  • Loading branch information
Shashank02051997 committed Jul 29, 2022
1 parent 1711852 commit b18ffcb
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .idea/gradle.xml

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

12 changes: 9 additions & 3 deletions .idea/modules.xml

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

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Add this to your module's `build.gradle` file (make sure the version matches the
```gradle
dependencies {
...
implementation 'com.github.Shashank02051997:FancyFacebookBadge-Android:1.5'
implementation 'com.github.Shashank02051997:FancyFacebookBadge-Android:1.6'
}
```
# Fancy Facebook Badge
Expand Down
12 changes: 6 additions & 6 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.fancyfacebookbadgelibrary"
minSdkVersion 19
targetSdkVersion 30
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Expand All @@ -20,10 +20,10 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
compile project(':fancyfacebookbadgelib')
implementation project(':fancyfacebookbadgelib')
}
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 @@ -16,22 +16,14 @@ public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final FacebookNotificationBadge mBadge = (FacebookNotificationBadge) findViewById(R.id.badge);
final FacebookNotificationBadge mBadge = findViewById(R.id.badge);
mBadge.setEmoji(Emoji.HAHA);
Button increase = (Button) findViewById(R.id.button);
increase.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mBadge.setNumber(++mCount);
}
});
Button clear = (Button) findViewById(R.id.button2);
clear.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mCount = 0;
mBadge.setNumber(mCount);
}
Button increase = findViewById(R.id.button);
increase.setOnClickListener(view -> mBadge.setNumber(++mCount));
Button clear = findViewById(R.id.button2);
clear.setOnClickListener(view -> {
mCount = 0;
mBadge.setNumber(mCount);
});

}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
Expand Down
7 changes: 3 additions & 4 deletions fancyfacebookbadgelib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.Shashank02051997'

android {
compileSdkVersion 30
compileSdkVersion 31
defaultConfig {
minSdkVersion 19
targetSdkVersion 30
targetSdkVersion 31
versionCode 1
versionName "1.0"

Expand All @@ -26,7 +25,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.appcompat:appcompat:1.4.2'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Aug 05 15:18:08 IST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit b18ffcb

Please sign in to comment.