mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
wip
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
a127eac5e6
commit
dc41a2f7f0
1 changed files with 6 additions and 2 deletions
|
@ -146,16 +146,20 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
|
||||||
for (Action action : notification.getActions()) {
|
for (Action action : notification.getActions()) {
|
||||||
button = new MaterialButton(notificationsActivity);
|
button = new MaterialButton(notificationsActivity);
|
||||||
|
|
||||||
|
int primaryColor = ThemeUtils.primaryColor(notificationsActivity);
|
||||||
|
|
||||||
if (action.primary) {
|
if (action.primary) {
|
||||||
button.getBackground().setColorFilter(ThemeUtils.primaryColor(notificationsActivity),
|
button.getBackground().setColorFilter(primaryColor, PorterDuff.Mode.SRC_ATOP);
|
||||||
PorterDuff.Mode.SRC_ATOP);
|
|
||||||
button.setTextColor(ThemeUtils.fontColor(notificationsActivity));
|
button.setTextColor(ThemeUtils.fontColor(notificationsActivity));
|
||||||
|
button.setTypeface(button.getTypeface(), Typeface.BOLD);
|
||||||
} else {
|
} else {
|
||||||
button.setStrokeColor(ColorStateList.valueOf(resources.getColor(R.color.grey_200)));
|
button.setStrokeColor(ColorStateList.valueOf(resources.getColor(R.color.grey_200)));
|
||||||
button.setStrokeWidth(3);
|
button.setStrokeWidth(3);
|
||||||
|
|
||||||
button.getBackground().setColorFilter(resources.getColor(R.color.transparent),
|
button.getBackground().setColorFilter(resources.getColor(R.color.transparent),
|
||||||
PorterDuff.Mode.SRC_ATOP);
|
PorterDuff.Mode.SRC_ATOP);
|
||||||
|
button.setTextColor(primaryColor);
|
||||||
|
button.setTypeface(button.getTypeface(), Typeface.BOLD);
|
||||||
}
|
}
|
||||||
|
|
||||||
button.setText(action.label);
|
button.setText(action.label);
|
||||||
|
|
Loading…
Reference in a new issue