Skip to content

Commit

Permalink
Create a view to show number of unread messages
Browse files Browse the repository at this point in the history
  • Loading branch information
JcMinarro committed Sep 30, 2024
1 parent 24961df commit e30f7af
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/nav_counter_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#ff0000"/>
</shape>
16 changes: 16 additions & 0 deletions app/src/main/res/layout/action_menu_counter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:id="@+id/counter"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:background="@drawable/nav_counter_background"
android:gravity="center"
android:textColor="#ffffff"
android:textStyle="bold"
tools:text="99+">
</TextView>
</FrameLayout>

0 comments on commit e30f7af

Please sign in to comment.