title: Failed to set textColor in Android on some devices
body: <p>I have a game which I need to change the color of the text according to users inputs</p>
  
  <p>I change the text in 2 places using different methods and both methods fail on some devices and textColor always become black with white stroke on those devices , however I never add stroke on my code anywhere, devices reported so far is Samsung galaxy prime, Xiaomi Mi A2 Lite, Huawei P20 Pro, however I tried the game on Samsung galaxy prime a friend of mine have and it worked perfect, so I'm unable to generate this issue on a testing device I have</p>
  
  <p>Picture showing the issue, all text is black with white stroke color</p>
  
  <p><a href="https://i.stack.imgur.com/iEDJG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iEDJG.png" alt="enter image description here"></a></p>
  
  <p>normal picture</p>
  
  <p><a href="https://i.stack.imgur.com/YvEHz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YvEHz.png" alt="enter image description here"></a></p>
  
  <p>First method in the keyboard section my code is as below</p>
  
  <pre><code>btns[t].setTextColor(ContextCompat.getColor(getContext(),R.color.text_color));
  </code></pre>
  
  <p>and when user set night mode I change it to be</p>
  
  <pre><code>btns[t].setTextColor(ContextCompat.getColor(getContext(), R.color.text_color_night));
  </code></pre>
  
  <p>where colors is text_color = #000000 / text_color_night = #ffffff</p>
  
  <p>Second method in the play board section , my code is </p>
  
  <pre><code>private final Paint selectedBox = new Paint();
  
  private final TextPaint letterTextNormal = new TextPaint();
  private final TextPaint letterTextCorrect = new TextPaint();
  private final TextPaint letterTextWrong = new TextPaint();
  
  public PlayboardRenderer(Context con) {
      letterTextNormal.setTextAlign(Align.CENTER);
      letterTextNormal.setAntiAlias(true);
      letterTextNormal.setTypeface(((MainActivity) con).getSelectedFont());
  
      letterTextCorrect.setTextAlign(Align.CENTER);
      letterTextCorrect.setAntiAlias(true);
      letterTextCorrect.setTypeface(((MainActivity) con).getSelectedFont());
  
      letterTextWrong.setTextAlign(Align.CENTER);
      letterTextWrong.setAntiAlias(true);
      letterTextWrong.setTypeface(((MainActivity) con).getSelectedFont());
  }
  
  private void drawBox(Canvas canvas, int x, int y, int row, int col, float scale, Box box, Word currentWord) {
      int boxSize = (int) (BOX_SIZE * scale);
  
      // scale paints
      float textSize = (boxSize) - (boxSize / 5);
      letterTextNormal.setTextSize(textSize);
      letterTextCorrect.setTextSize(textSize);
      letterTextWrong.setTextSize(textSize);
  
          if (!box.isBlank() &amp;&amp; !box.isEmpty())
              if (box.getState() == Box.STATE.NORMAL) {
                  canvas.drawText(Character.toString(box.getChar()), x + (boxSize / 2), y + (int) (textSize * 0.9), letterTextNormal);
              } else if (box.getState() == Box.STATE.WRONG) {
                  canvas.drawText(Character.toString(box.getChar()), x + (boxSize / 2), y + (int) (textSize * 0.9), letterTextWrong);
              } else if (box.getState() == Box.STATE.CORRECT) {
                  canvas.drawText(Character.toString(box.getChar()), x + (boxSize / 2), y + (int) (textSize * 0.9), letterTextCorrect);
              }
      }
  }
  </code></pre>