Created
May 3, 2019 14:06
-
-
Save fardavide/96f4163ee3fa1a786f00db1b5bb017b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NotificationBuilder( private val context: Context ) { | |
var title: String? = null | |
@get: StringRes titleRes: Int? = null | |
... | |
fun build() : Notification { | |
val notificationTitle = title | |
?: titleRes?.let { context.getString( titleRes ) }!! | |
... | |
return notification | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment