Skip to content

Commit fea48db

Browse files
style(status): Add cut-out backgroudn for reguular status icon
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 parent dc9f953 commit fea48db

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

app/src/main/java/it/niedermann/owncloud/notes/accountswitcher/AccountSwitcherDialog.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,5 +193,6 @@ public static DialogFragment newInstance(long currentAccountId) {
193193
public void applyBrand(int color) {
194194
final var util = BrandingUtil.of(color, requireContext());
195195
util.notes.colorLayerDrawable((LayerDrawable) binding.check.getDrawable(), R.id.area, color);
196+
util.notes.colorBackgroundDrawable(binding.accountStatusIcon);
196197
}
197198
}

app/src/main/java/it/niedermann/owncloud/notes/branding/NotesViewThemeUtils.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ public void colorNavigationViewItem(@NonNull View view) {
6969
});
7070
}
7171

72+
public void colorBackgroundDrawable(@NonNull ImageView view) {
73+
withScheme(view, scheme -> {
74+
view.setBackgroundTintList(ColorStateList.valueOf(dynamicColor.surface().getArgb(scheme)));
75+
return view;
76+
});
77+
}
78+
7279
/**
7380
* The Notes app uses custom navigation view items because they have several features which are
7481
* not covered by {@link NavigationItem}.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@
5050
android:layout_width="@dimen/user_status_icon_size"
5151
android:layout_height="@dimen/user_status_icon_size"
5252
android:layout_gravity="bottom|end"
53+
android:background="@drawable/round_bgnd"
5354
android:visibility="gone"
5455
app:srcCompat="@drawable/ic_user_status_away"
55-
tools:visibility="visible"/>
56+
tools:visibility="visible" />
5657
</FrameLayout>
5758

5859
<LinearLayout

0 commit comments

Comments
 (0)