diff --git a/app/src/main/java/com/noti/main/ui/HolderFragment.java b/app/src/main/java/com/noti/main/ui/HolderFragment.java index f109d3b..9679e6d 100644 --- a/app/src/main/java/com/noti/main/ui/HolderFragment.java +++ b/app/src/main/java/com/noti/main/ui/HolderFragment.java @@ -32,7 +32,7 @@ public void setType(String type) { @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.activity_options, container, false); - view.setBackgroundColor(getResources().getColor(R.color.ui_bg_surface)); + view.setBackgroundColor(getResources().getColor(R.color.ui_bg_surface, null)); mToolbar = view.findViewById(R.id.toolbar); mToolbar.setTitle(R.string.app_name); diff --git a/app/src/main/java/com/noti/main/ui/SettingsActivity.java b/app/src/main/java/com/noti/main/ui/SettingsActivity.java index 35e583c..37db5e9 100644 --- a/app/src/main/java/com/noti/main/ui/SettingsActivity.java +++ b/app/src/main/java/com/noti/main/ui/SettingsActivity.java @@ -237,7 +237,7 @@ protected void onCreate(Bundle savedInstanceState) { }); boolean isNightMode = (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; - ServiceToggle.setTextColor(getResources().getColor(isNightMode ? R.color.ui_bg : R.color.ui_fg)); + ServiceToggle.setTextColor(getResources().getColor(isNightMode ? R.color.ui_bg : R.color.ui_fg, null)); boolean isUIDBlank = prefs.getString("UID", "").isEmpty(); if (isUIDBlank) { @@ -377,31 +377,31 @@ void markSelectedMenu(MaterialCardView cardView) { if (Application.isTablet()) { if (selectedCardView == null) { selectedCardView = cardView; - selectedCardView.setCardBackgroundColor(getResources().getColor(R.color.ui_menu_accent)); + selectedCardView.setCardBackgroundColor(getResources().getColor(R.color.ui_menu_accent, null)); if (isNightMode) { ImageView icon = (ImageView) ((RelativeLayout) selectedCardView.getChildAt(0)).getChildAt(0); - icon.setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.ui_bg))); + icon.setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.ui_bg, null))); LinearLayout layout = (LinearLayout) ((RelativeLayout) selectedCardView.getChildAt(0)).getChildAt(1); - ((TextView) layout.getChildAt(0)).setTextColor(getResources().getColor(R.color.ui_bg)); - ((TextView) layout.getChildAt(1)).setTextColor(getResources().getColor(R.color.ui_bg)); + ((TextView) layout.getChildAt(0)).setTextColor(getResources().getColor(R.color.ui_bg, null)); + ((TextView) layout.getChildAt(1)).setTextColor(getResources().getColor(R.color.ui_bg, null)); } } else if (selectedCardView.getId() != cardView.getId()) { - selectedCardView.setCardBackgroundColor(getResources().getColor(R.color.ui_bg)); - cardView.setCardBackgroundColor(getResources().getColor(R.color.ui_menu_accent)); + selectedCardView.setCardBackgroundColor(getResources().getColor(R.color.ui_bg, null)); + cardView.setCardBackgroundColor(getResources().getColor(R.color.ui_menu_accent, null)); if (isNightMode) { - ((ImageView) ((RelativeLayout) selectedCardView.getChildAt(0)).getChildAt(0)).setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.ui_fg))); - ((ImageView) ((RelativeLayout) cardView.getChildAt(0)).getChildAt(0)).setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.ui_bg))); + ((ImageView) ((RelativeLayout) selectedCardView.getChildAt(0)).getChildAt(0)).setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.ui_fg, null))); + ((ImageView) ((RelativeLayout) cardView.getChildAt(0)).getChildAt(0)).setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.ui_bg, null))); LinearLayout layout1 = (LinearLayout) ((RelativeLayout) selectedCardView.getChildAt(0)).getChildAt(1); - ((TextView) layout1.getChildAt(0)).setTextColor(getResources().getColor(R.color.ui_fg)); - ((TextView) layout1.getChildAt(1)).setTextColor(getResources().getColor(R.color.ui_fg)); + ((TextView) layout1.getChildAt(0)).setTextColor(getResources().getColor(R.color.ui_fg, null)); + ((TextView) layout1.getChildAt(1)).setTextColor(getResources().getColor(R.color.ui_fg, null)); LinearLayout layout2 = (LinearLayout) ((RelativeLayout) cardView.getChildAt(0)).getChildAt(1); - ((TextView) layout2.getChildAt(0)).setTextColor(getResources().getColor(R.color.ui_bg)); - ((TextView) layout2.getChildAt(1)).setTextColor(getResources().getColor(R.color.ui_bg)); + ((TextView) layout2.getChildAt(0)).setTextColor(getResources().getColor(R.color.ui_bg, null)); + ((TextView) layout2.getChildAt(1)).setTextColor(getResources().getColor(R.color.ui_bg, null)); } selectedCardView = cardView; }