1

I'm performing tests against several APIs and devices to test an app and in Xiaomi device it gets to display Textviews in a different color than the one it should, with so bad luck in the chosen color that it can be hardly differentiated from the background.

For reference, in Android emulator the Textiew, whose text is Ver 3.10.0 displays like this:

enter image description here

While in my Xiaomi device displays like this:

enter image description here

This is the code used to define the textView, it explicitely defines the TextView to display with the textColor which appears on emulator.

 <TextView
            android:id="@+id/tvLoginVersion"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Ver. x.x.x"
            android:textColor="@color/colorAzulSga"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/ivLogoLoginActivity" />

So, I cannot understand why in a Xiaomi device it displays in that color that is hardly distinguishable from the background. I cannot guarantee that this only happens in Xiaomi device, but for testing purposes I'd like to make it display properly there.

Any idea on how to make the TextView display in the same text color as the one that shows in the emulator?

user2638180
  • 1,013
  • 16
  • 37
  • I see you have set `android:textColor="@color/colorAzulSga"`. Have you checked if you have defined different color values for `colorAzulSga` for different configurations? In other words, if you hard code a color like `android:textColor="#FF0000"`, can you see the same problem? – Ryan W Nov 19 '21 at 03:13
  • @RyanWong, yes I have tested to put android:textColor="#000000" and it still displays in that light blue color. – user2638180 Nov 19 '21 at 08:07
  • 1
    You can try [this](https://stackoverflow.com/a/62732689/14837619) – Yechiel babani Nov 29 '21 at 15:47
  • Do you have any solutions? – Pavel Kozemirov May 15 '23 at 14:35

0 Answers0