Skip to content

Commit 597188e

Browse files
committed
Release v1.0.6
1 parent 56072dc commit 597188e

9 files changed

+54
-13
lines changed

README.md

+52-11
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,28 @@
88
- Simple and eazy to use
99
- With many feature
1010
- Full documentation
11+
- Custom Layout Notification
1112

1213
## Screenshoot Library Sample
13-
|Simple Notification | Custom Notification | Stack Notification |
14-
|:------------------:|:---------------------:|:---------------------:|
15-
|<img width="200px" height="360px" src="docs/image/simple_notif.gif"> | <img width="200px" height="360px" src="docs/image/custom_notif.gif"> | <img width="200px" height="360px" src="docs/image/stack_notif.gif"> |
14+
|Simple Notification | Custom Notification (1) | Custom Notification (2) | Stack Notification |
15+
|:------------------:|:-------------------------:|:-------------------------:|:---------------------:|
16+
|<img width="200px" height="360px" src="docs/image/ss_simple_notif.gif"> | <img width="200px" height="360px" src="docs/image/ss_custom_layout.gif"> | <img width="200px" height="360px" src="docs/image/ss_reply_notif.gif"> | <img width="200px" height="360px" src="docs/image/ss_stack_notif.gif"> |
1617

1718

1819
## Version Release
1920
This Is Latest Release
2021

21-
$version_release = 1.0.5
22+
$version_release = 1.0.6
2223

2324
What's New??
2425

2526
* Bug Fixed *
2627
* Enhance Performance *
2728
* Update : build.gradle latest version *
29+
* Update : Android Gradle Plugin 7.0.0 *
30+
* Adding : Custom Layout Notification *
31+
* Solving Feature Request *
32+
* Solving Issue *
2833

2934
## Download this project
3035

@@ -43,7 +48,7 @@ What's New??
4348

4449
dependencies {
4550
// library frogo-notification
46-
implementation 'com.github.amirisback:frogo-notification:1.0.5'
51+
implementation 'com.github.amirisback:frogo-notification:1.0.6'
4752
}
4853

4954
### Step 3. Implement frogo-notification (Simple Notification)
@@ -57,7 +62,7 @@ What's New??
5762
.setContentTitle(resources.getString(R.string.content_title)) // Initialize for Content Title
5863
.setContentText(resources.getString(R.string.content_text)) // Initialize for Content Text
5964
.setSubText(resources.getString(R.string.subtext)) // Initialize for Sub Text
60-
.setAutoCancel(true) // Initialize for Auto Cancel
65+
.setupAutoCancel() // Initialize for Auto Cancel
6166
.build() // Build the Frogo Notification
6267
.launch(NOTIFICATION_ID) // Notify the Frogo Notification
6368

@@ -74,10 +79,46 @@ What's New??
7479
.setContentTitle(resources.getString(R.string.content_title)) // Initialize for Content Title
7580
.setContentText(resources.getString(R.string.content_text)) // Initialize for Content Text
7681
.setSubText(resources.getString(R.string.subtext)) // Initialize for Sub Text
77-
.setAutoCancel(true) // Initialize for Auto Cancel
82+
.setupAutoCancel() // Initialize for Auto Cancel
7883
.build() // Build the Frogo Notification
7984
.launch(NOTIFICATION_ID) // Notify the Frogo Notification
8085

86+
### Custom Layout (NEW FEATURE)
87+
88+
val collapsed = object : FrogoNotifCustomContentViewListener {
89+
override fun setupCustomView(): Int {
90+
return R.layout.notification_collapsed
91+
}
92+
93+
override fun setupComponent(context: Context, customView: RemoteViews) {
94+
customView.apply{
95+
setTextViewText(R.id.text_view_collapsed_1, "Hello World!")
96+
}
97+
}
98+
}
99+
100+
val expanded = object : FrogoNotifCustomContentViewListener {
101+
override fun setupCustomView(): Int {
102+
return R.layout.notification_expanded
103+
}
104+
105+
override fun setupComponent(context: Context, customView: RemoteViews) {
106+
customView.apply {
107+
setImageViewResource(R.id.image_view_expanded, R.drawable.ic_android)
108+
setOnClickPendingIntent(R.id.image_view_expanded, clickPendingIntent)
109+
}
110+
}
111+
}
112+
113+
FrogoNotification.Inject(this) // Intialize for Context
114+
.setChannelId(FrogoApp.CHANNEL_ID) // Intialize for Channel ID
115+
.setChannelName(FrogoApp.CHANNEL_NAME) // Initialize for Channel Name
116+
.setSmallIcon(R.drawable.ic_android) // Initialize for Small Icon
117+
.setCustomContentView(collapsed)
118+
.setCustomBigContentView(expanded)
119+
.build() // Build the Frogo Notification
120+
.launch(FrogoApp.NOTIFICATION_ID) // Notify the Frogo Notification
121+
81122
### With Action Replay
82123

83124
FrogoNotification.Inject(this)
@@ -86,8 +127,8 @@ What's New??
86127
.setSmallIcon(R.drawable.ic_frogo_notif)
87128
.setContentTitle(getString(R.string.notif_title))
88129
.setContentText(getString(R.string.notif_content))
89-
.showWhen(true)
90-
.setupActionRemoteInput(object : IFNActionRemoteInput {
130+
.setupShowWhen()
131+
.setupActionRemoteInput(object : FrogoNotifActionRemoteInputListener {
91132
override fun setRemoteInputResultKey(): String {
92133
return KEY_REPLY
93134
}
@@ -124,7 +165,7 @@ What's New??
124165
.setSmallIcon(R.drawable.ic_frogo_email)
125166
.setGroup(GROUP_KEY_EMAILS)
126167
.setContentIntent(pendingIntent)
127-
.setAutoCancel(true)
168+
.setupAutoCancel()
128169

129170
// Check if NotificationID is smaller than Max Notif
130171
if (idNotification < MAX_NOTIFICATION) {
@@ -142,7 +183,7 @@ What's New??
142183
.setContentTitle("$idNotification new emails")
143184
.setContentText("[email protected]")
144185
.setGroupSummary()
145-
.setupInboxStyle(object : IFNInboxStyle {
186+
.setupInboxStyle(object : FrogoNotifInboxStyleListener {
146187
override fun addLine1(): String {
147188
return "New Email from " + stackNotif[idNotification].sender
148189
}

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ buildscript {
1212

1313
def versionMajor = 1
1414
def versionMinor = 0
15-
def versionPatch = 5
15+
def versionPatch = 6
1616

17-
projectCompileSdk = 30
17+
projectCompileSdk = 31
1818
projectMinSdk = 21
1919
projectTargetSdk = projectCompileSdk
2020

docs/image/custom_notif.gif

-5.74 MB
Binary file not shown.

docs/image/simple_notif.gif

-3.07 MB
Binary file not shown.

docs/image/ss_custom_layout.gif

2.51 MB
Loading

docs/image/ss_reply_notif.gif

2.89 MB
Loading

docs/image/ss_simple_notif.gif

2.16 MB
Loading

docs/image/ss_stack_notif.gif

4.38 MB
Loading

docs/image/stack_notif.gif

-5.67 MB
Binary file not shown.

0 commit comments

Comments
 (0)