Skip to content

Instantly share code, notes, and snippets.

View ngangavic's full-sized avatar
💻
I love deadlines

Ng'ang'a Victor ngangavic

💻
I love deadlines
View GitHub Profile
@ngangavic
ngangavic / custom_button.xml
Created October 8, 2020 08:13
Custom buton lines stack on each other.(No solution yet)
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:top="-6dp"
android:left="-6dp"
android:right="-6dp"
android:bottom="5dp">
<shape android:shape="rectangle">
<stroke android:color="#9FB3CF" android:width="3dp"/>
</shape>
private fun sendNotification(messageBody: String) {
val channelId = getString(R.string.default_notification_channel_id)
val defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)
val notificationBuilder = NotificationCompat.Builder(this, channelId)
.setSmallIcon(R.drawable.ic_stat_name)
.setContentTitle(getString(R.string.fcm_message))
.setContentText(messageBody)
.setAutoCancel(true)
.setSound(defaultSoundUri)