Notification badge in navigation menu (#702)

Merge branch 'master' into 700-notifications-counter

Notification badge in navigation menu

Co-authored-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: M M Arif <mmarif@swatian.com>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/702
This commit is contained in:
M M Arif
2020-09-18 06:51:41 +02:00
co-authored by 6543 M M Arif
parent 78782d159a
commit 1f5eeb5632
6 changed files with 92 additions and 7 deletions
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">
<TextView
android:id="@+id/counterBadgeNotification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:maxLength="4"
android:ellipsize="marquee"
android:background="@drawable/shape_badge_background"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@color/colorWhite"
android:textSize="12sp" />
</LinearLayout>
+2
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:showIn="navigation_view">
<group android:checkableBehavior="single"
@@ -26,6 +27,7 @@
android:id="@+id/nav_notifications"
android:icon="@drawable/ic_notifications"
android:title="@string/pageTitleNotifications"
app:actionLayout="@layout/badge_notification"
android:visible="false" />
<item android:id="@+id/nav_explore"