@Override public boolean changeBackgroundColour() { if (ScreenSettings.isNightMode()) { setBackgroundColor(Color.BLACK); setTextColor(Color.WHITE); } else { setBackgroundColor(Color.WHITE); setTextColor(Color.BLACK); } // should not return false but it is used to see if text needs refreshing, which it doesn't return false; }
/** may need updating depending on environmental brightness */ @Override public boolean changeBackgroundColour() { // if night mode then set scrollbar colour int newBackgroundColour = ScreenSettings.isNightMode() ? Color.BLACK : Color.WHITE; boolean changed = mCurrentBackgroundColour != newBackgroundColour; if (changed) { setBackgroundColor(newBackgroundColour); mCurrentBackgroundColour = newBackgroundColour; } return changed; }