Exemplo n.º 1
0
 @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;
 }
Exemplo n.º 2
0
  /** 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;
  }