@@ -237,7 +237,7 @@ protected void onCreate(Bundle savedInstanceState) {
237237 });
238238
239239 boolean isNightMode = (getResources ().getConfiguration ().uiMode & Configuration .UI_MODE_NIGHT_MASK ) == Configuration .UI_MODE_NIGHT_YES ;
240- ServiceToggle .setTextColor (getResources ().getColor (isNightMode ? R .color .ui_bg : R .color .ui_fg ));
240+ ServiceToggle .setTextColor (getResources ().getColor (isNightMode ? R .color .ui_bg : R .color .ui_fg , null ));
241241
242242 boolean isUIDBlank = prefs .getString ("UID" , "" ).isEmpty ();
243243 if (isUIDBlank ) {
@@ -377,31 +377,31 @@ void markSelectedMenu(MaterialCardView cardView) {
377377 if (Application .isTablet ()) {
378378 if (selectedCardView == null ) {
379379 selectedCardView = cardView ;
380- selectedCardView .setCardBackgroundColor (getResources ().getColor (R .color .ui_menu_accent ));
380+ selectedCardView .setCardBackgroundColor (getResources ().getColor (R .color .ui_menu_accent , null ));
381381
382382 if (isNightMode ) {
383383 ImageView icon = (ImageView ) ((RelativeLayout ) selectedCardView .getChildAt (0 )).getChildAt (0 );
384- icon .setImageTintList (ColorStateList .valueOf (getResources ().getColor (R .color .ui_bg )));
384+ icon .setImageTintList (ColorStateList .valueOf (getResources ().getColor (R .color .ui_bg , null )));
385385
386386 LinearLayout layout = (LinearLayout ) ((RelativeLayout ) selectedCardView .getChildAt (0 )).getChildAt (1 );
387- ((TextView ) layout .getChildAt (0 )).setTextColor (getResources ().getColor (R .color .ui_bg ));
388- ((TextView ) layout .getChildAt (1 )).setTextColor (getResources ().getColor (R .color .ui_bg ));
387+ ((TextView ) layout .getChildAt (0 )).setTextColor (getResources ().getColor (R .color .ui_bg , null ));
388+ ((TextView ) layout .getChildAt (1 )).setTextColor (getResources ().getColor (R .color .ui_bg , null ));
389389 }
390390 } else if (selectedCardView .getId () != cardView .getId ()) {
391- selectedCardView .setCardBackgroundColor (getResources ().getColor (R .color .ui_bg ));
392- cardView .setCardBackgroundColor (getResources ().getColor (R .color .ui_menu_accent ));
391+ selectedCardView .setCardBackgroundColor (getResources ().getColor (R .color .ui_bg , null ));
392+ cardView .setCardBackgroundColor (getResources ().getColor (R .color .ui_menu_accent , null ));
393393
394394 if (isNightMode ) {
395- ((ImageView ) ((RelativeLayout ) selectedCardView .getChildAt (0 )).getChildAt (0 )).setImageTintList (ColorStateList .valueOf (getResources ().getColor (R .color .ui_fg )));
396- ((ImageView ) ((RelativeLayout ) cardView .getChildAt (0 )).getChildAt (0 )).setImageTintList (ColorStateList .valueOf (getResources ().getColor (R .color .ui_bg )));
395+ ((ImageView ) ((RelativeLayout ) selectedCardView .getChildAt (0 )).getChildAt (0 )).setImageTintList (ColorStateList .valueOf (getResources ().getColor (R .color .ui_fg , null )));
396+ ((ImageView ) ((RelativeLayout ) cardView .getChildAt (0 )).getChildAt (0 )).setImageTintList (ColorStateList .valueOf (getResources ().getColor (R .color .ui_bg , null )));
397397
398398 LinearLayout layout1 = (LinearLayout ) ((RelativeLayout ) selectedCardView .getChildAt (0 )).getChildAt (1 );
399- ((TextView ) layout1 .getChildAt (0 )).setTextColor (getResources ().getColor (R .color .ui_fg ));
400- ((TextView ) layout1 .getChildAt (1 )).setTextColor (getResources ().getColor (R .color .ui_fg ));
399+ ((TextView ) layout1 .getChildAt (0 )).setTextColor (getResources ().getColor (R .color .ui_fg , null ));
400+ ((TextView ) layout1 .getChildAt (1 )).setTextColor (getResources ().getColor (R .color .ui_fg , null ));
401401
402402 LinearLayout layout2 = (LinearLayout ) ((RelativeLayout ) cardView .getChildAt (0 )).getChildAt (1 );
403- ((TextView ) layout2 .getChildAt (0 )).setTextColor (getResources ().getColor (R .color .ui_bg ));
404- ((TextView ) layout2 .getChildAt (1 )).setTextColor (getResources ().getColor (R .color .ui_bg ));
403+ ((TextView ) layout2 .getChildAt (0 )).setTextColor (getResources ().getColor (R .color .ui_bg , null ));
404+ ((TextView ) layout2 .getChildAt (1 )).setTextColor (getResources ().getColor (R .color .ui_bg , null ));
405405 }
406406 selectedCardView = cardView ;
407407 }
0 commit comments