private void setReadModeImg() { if (day_night_title != null) { boolean isDay = PreferenceUtils.getDayMode(getActivity()); int id = isDay ? R.drawable.day_mode : R.drawable.night_mode; day_night_title.setCompoundDrawablesWithIntrinsicBounds(0, 0, id, 0); } }
private void updateTextColor(Context context) { int colorId = PreferenceUtils.getDayMode(context) ? R.color.text_black : R.color.text_white; fontSizeTitleTV.setTextColor(context.getResources().getColor(colorId)); fontSizeTV.setTextColor(context.getResources().getColor(colorId)); day_night_title.setTextColor(context.getResources().getColor(colorId)); readSlokaCB.setTextColor(context.getResources().getColor(colorId)); showSlokaCB.setTextColor(context.getResources().getColor(colorId)); showStoryCB.setTextColor(context.getResources().getColor(colorId)); enableSpeakCB.setTextColor(context.getResources().getColor(colorId)); }
private int getThemeId() { return PreferenceUtils.getDayMode(getActivity()) ? android.R.style.Theme_Holo_Light_Dialog : android.R.style.Theme_Holo_Dialog; }