Skip to content

Commit 3c8fd4c

Browse files
style(list): M2/Nextcloud list item style
Signed-off-by: Andy Scherzinger <[email protected]>
1 parent ce9c4ab commit 3c8fd4c

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,11 @@ public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int
141141
case TYPE_NOTE_WITH_EXCERPT, TYPE_NOTE_ONLY_TITLE, TYPE_NOTE_WITHOUT_EXCERPT -> {
142142
ItemNotesListNoteItemWithExcerptBinding binding = ItemNotesListNoteItemWithExcerptBinding.inflate(inflater, parent, false);
143143
BrandingUtil.of(color, parent.getContext()).notes.themeCard(binding.noteCard);
144+
/*
144145
BrandingUtil.of(color, parent.getContext()).platform.colorTextView(binding.noteTitle, ColorRole.ON_SURFACE);
145146
BrandingUtil.of(color, parent.getContext()).platform.colorTextView(binding.noteExcerpt, ColorRole.ON_SURFACE_VARIANT);
146147
BrandingUtil.of(color, parent.getContext()).platform.colorTextView(binding.noteModified, ColorRole.ON_SURFACE_VARIANT);
148+
*/
147149
return new NoteViewListHolder(binding, noteClickListener);
148150
}
149151
default -> {

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,15 @@
119119
android:layout_weight="1"
120120
android:ellipsize="end"
121121
android:maxLines="1"
122-
android:textColor="?android:textColorPrimary"
122+
android:textColor="@color/high_emphasis_text"
123123
android:textSize="@dimen/primary_font_size"
124124
tools:text="@tools:sample/lorem/random" />
125125

126126
<TextView
127127
android:id="@+id/noteModified"
128128
android:layout_width="wrap_content"
129129
android:layout_height="wrap_content"
130+
android:textColor="@color/medium_emphasis_text"
130131
android:paddingStart="@dimen/spacer_1x"
131132
android:paddingEnd="@dimen/zero"
132133
android:layout_gravity="end"
@@ -147,6 +148,7 @@
147148
android:maxLines="1"
148149
android:paddingVertical="1dp"
149150
android:textSize="@dimen/secondary_font_size"
151+
android:textColor="@color/medium_emphasis_text"
150152
tools:text="@tools:sample/lorem/random" />
151153

152154
<TextView

app/src/main/res/values-night/colors.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,10 @@
4242
<color name="action_mode_background">#1E1E1E</color>
4343
<color name="fontAppbar">@android:color/white</color>
4444
<color name="primary_button_text_color">#000000</color>
45+
46+
<!-- general text colors -->
47+
<color name="no_emphasis_text">#ffffff</color>
48+
<color name="high_emphasis_text">#deffffff</color>
49+
<color name="medium_emphasis_text">#99ffffff</color>
50+
<color name="low_emphasis_text">#61ffffff</color>
4551
</resources>

app/src/main/res/values/colors.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,10 @@
5757
<color name="online">#2D7B41</color>
5858
<color name="busy">#DB0606</color>
5959
<color name="offline">@color/high_emphasis_text</color>
60+
61+
<!-- general text colors -->
62+
<color name="no_emphasis_text">#000000</color>
63+
<color name="high_emphasis_text">#de000000</color>
64+
<color name="medium_emphasis_text">#99000000</color>
65+
<color name="low_emphasis_text">#61000000</color>
6066
</resources>

0 commit comments

Comments
 (0)