Skip to content

Commit a40c85d

Browse files
style(favorite): Use star outline variant for non-favorite state representation
Signed-off-by: Andy Scherzinger <[email protected]>
1 parent 7b8b133 commit a40c85d

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

app/src/main/java/it/niedermann/owncloud/notes/edit/BaseNoteFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
272272
if (ShortcutManagerCompat.isRequestPinShortcutSupported(context)) {
273273
final var pinShortcutInfo = new ShortcutInfoCompat.Builder(context, String.valueOf(note.getId()))
274274
.setShortLabel(note.getTitle())
275-
.setIcon(IconCompat.createWithResource(context.getApplicationContext(), TRUE.equals(note.getFavorite()) ? R.drawable.ic_star_yellow_24dp : R.drawable.ic_star_grey_ccc_24dp))
275+
.setIcon(IconCompat.createWithResource(context.getApplicationContext(), TRUE.equals(note.getFavorite()) ? R.drawable.ic_star_yellow_24dp : R.drawable.ic_star_border_grey_ccc_24dp))
276276
.setIntent(new Intent(getActivity(), EditNoteActivity.class).putExtra(EditNoteActivity.PARAM_NOTE_ID, note.getId()).setAction(ACTION_SHORTCUT))
277277
.build();
278278

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected void bindCategory(@NonNull Context context, @NonNull TextView noteCate
8282
}
8383

8484
protected void bindFavorite(@NonNull ImageView noteFavorite, boolean isFavorite) {
85-
noteFavorite.setImageResource(isFavorite ? R.drawable.ic_star_yellow_24dp : R.drawable.ic_star_grey_ccc_24dp);
85+
noteFavorite.setImageResource(isFavorite ? R.drawable.ic_star_yellow_24dp : R.drawable.ic_star_border_grey_ccc_24dp);
8686
noteFavorite.setOnClickListener(view -> noteClickListener.onNoteFavoriteClick(getLayoutPosition(), view));
8787
}
8888

app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ private void updateDynamicShortcuts(long accountId) {
672672

673673
newShortcuts.add(new ShortcutInfo.Builder(this.context, note.getId() + "")
674674
.setShortLabel(note.getTitle() + "")
675-
.setIcon(Icon.createWithResource(this.context, note.getFavorite() ? R.drawable.ic_star_yellow_24dp : R.drawable.ic_star_grey_ccc_24dp))
675+
.setIcon(Icon.createWithResource(this.context, note.getFavorite() ? R.drawable.ic_star_yellow_24dp : R.drawable.ic_star_border_grey_ccc_24dp))
676676
.setIntent(intent)
677677
.build());
678678
} else {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!--
2+
~ Nextcloud Notes - Android Client
3+
~
4+
~ SPDX-FileCopyrightText: 2018-2025 Google LLC
5+
~ SPDX-License-Identifier: Apache-2.0
6+
-->
7+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
8+
android:width="24dp"
9+
android:height="24dp"
10+
android:viewportWidth="960"
11+
android:viewportHeight="960">
12+
<path
13+
android:fillColor="#CCCCCC"
14+
android:pathData="M354,673L480,597L606,674L573,530L684,434L538,421L480,285L422,420L276,433L387,530L354,673ZM233,840L298,559L80,370L368,345L480,80L592,345L880,370L662,559L727,840L480,691L233,840ZM480,490L480,490L480,490L480,490L480,490L480,490L480,490L480,490L480,490L480,490Z" />
15+
</vector>

0 commit comments

Comments
 (0)