Skip to content

Instantly share code, notes, and snippets.

View polojerry's full-sized avatar
💻
The more you learn , the more you code

Jeremiah Polo polojerry

💻
The more you learn , the more you code
View GitHub Profile
@polojerry
polojerry / DetachingToolbarMenuBadge.kt
Last active July 28, 2021 11:26
Detaching a Badge from Toolbar Menu
BadgeUtils.detachBadgeDrawable(
badge,
toolbar,
menuId
)
@polojerry
polojerry / CreateToolbarMenuBadge.kt
Last active July 28, 2021 11:25
Creating a badge on Toolbar
val badge = BadgeDrawable.create(context)
badge.number = 10
BadgeUtils.attachBadgeDrawable(
badge,
toolbar,
menuId
)
@polojerry
polojerry / RemoveBottomNavigationBadge.kt
Last active July 28, 2021 11:27
Removing a bottom navigation badge
bottomNavigation.removeBadge(menuId)
@polojerry
polojerry / CreateBottomNavigationBadge.kt
Last active July 28, 2021 11:27
Creating a badge in bottom navigation
val badge = bottomNavigation.getOrCreateBadge(menuId)
badge.isVisible = true
badge.number = 10
@polojerry
polojerry / activity_login.xml
Created November 9, 2019 16:34
Login design for dating app
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView