Skip to content

Commit 6b336e4

Browse files
Merge pull request #1753 from nextcloud/fix-category-colors
fix(theming): Fix category theming
2 parents e7e8f1e + 51074e6 commit 6b336e4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

app/src/main/java/it/niedermann/owncloud/notes/main/items/NoteViewHolder.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,12 @@ protected void bindCategory(@NonNull Context context, @NonNull TextView noteCate
7272
if (noteCategory instanceof Chip) {
7373
util.material.colorChipBackground((Chip) noteCategory);
7474
} else {
75-
util.platform.tintDrawable(context, noteCategory.getBackground(), ColorRole.PRIMARY);
7675
if (isDarkMode(context)) {
77-
util.platform.colorTextView(noteCategory, ColorRole.ON_PRIMARY);
78-
} else {
76+
util.platform.tintDrawable(context, noteCategory.getBackground(), ColorRole.SECONDARY_CONTAINER);
7977
util.platform.colorTextView(noteCategory, ColorRole.ON_SECONDARY_CONTAINER);
78+
} else {
79+
util.platform.tintDrawable(context, noteCategory.getBackground(), ColorRole.PRIMARY);
80+
util.platform.colorTextView(noteCategory, ColorRole.ON_PRIMARY_CONTAINER);
8081
}
8182
}
8283

app/src/main/res/layout/item_notes_list_note_item_grid.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
app:chipEndPadding="@dimen/spacer_1x"
9494
app:chipMinHeight="0dp"
9595
app:chipStartPadding="@dimen/spacer_1x"
96-
app:chipStrokeColor="@color/defaultBrand"
96+
app:chipStrokeColor="@android:color/transparent"
9797
app:chipStrokeWidth="1dp"
9898
app:ensureMinTouchTargetSize="false"
9999
app:textEndPadding="0dp"

0 commit comments

Comments
 (0)