diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/details/GradeDetailsHeader.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/details/GradeDetailsHeader.kt index e5f6e8249..9ed412808 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/details/GradeDetailsHeader.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/details/GradeDetailsHeader.kt @@ -38,6 +38,7 @@ class GradeDetailsHeader( gradeHeaderAverage.text = average gradeHeaderNumber.text = number gradeHeaderNote.visibility = if (newGrades > 0) VISIBLE else GONE + if (newGrades > 0) gradeHeaderNote.text = newGrades.toString(10) gradeHeaderContainer.isEnabled = isExpandable isViewExpandable = isExpandable diff --git a/app/src/main/res/drawable/background_header_note.xml b/app/src/main/res/drawable/background_header_note.xml new file mode 100644 index 000000000..b6555847b --- /dev/null +++ b/app/src/main/res/drawable/background_header_note.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/header_grade_details.xml b/app/src/main/res/layout/header_grade_details.xml index 40f486cf5..0fa3872e1 100644 --- a/app/src/main/res/layout/header_grade_details.xml +++ b/app/src/main/res/layout/header_grade_details.xml @@ -7,7 +7,7 @@ android:background="?selectableItemBackground" android:paddingLeft="16dp" android:paddingTop="10dp" - android:paddingRight="12dp" + android:paddingRight="14dp" android:paddingBottom="10dp" tools:context=".ui.modules.grade.details.GradeDetailsHeader" android:paddingEnd="12dp" @@ -50,14 +50,19 @@ android:textSize="12sp" tools:text="12 grades" /> - + android:background="@drawable/background_header_note" + android:textColor="?colorOnPrimary" + android:textSize="14sp" + tools:text="255" />