I can't display specific numbers in a TextView
. This happens when I am trying both to update the view's text
programmaticaly or in just in the xml.
Here is the TextView as defined in a layout file,
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:textAlignment="center"
android:text="0"
android:textColor="@color/primaryTextColor"
android:textSize="48sp"
app:layout_constraintBottom_toBottomOf="@+id/title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/title"
android:gravity="center_horizontal" />
I can also see that in the Android Studio editor. If I set text
to 1, 2 and 3 I can see the number displayed. But if I set text
to 0, 4, 5, 6, 7, 8, and 9 then there's nothing.
What am I missing here?
Edit: I am adding two screenshots directly from the Android Studio's layout editor. Each screenshot represents the same textview with different values:
For text="123"
,
and now for text="142"
,
Note: The 4
seems to take a character's space in the TextView
but it's not being displayed.