I have an EditText set as android:inputType="number"
and have a hint string set on it. The issue is that when running the app the text 0 is added to the edittext and the hint is not displaying.
The android:text
value is not set. I have also tried to set it to empty but without any effect.
Any clue on how to solve this?
Edit: I did try and do as said in the answer in comment but doesn't work.
The code is as follows:
<EditText
android:id="@+id/txtEngineCapacity"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/maptextbox"
android:ems="10"
android:fontFamily="@font/lato_light"
android:hint="@string/vehicleCC"
android:inputType="number"
android:textSize="18sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtChassisNumber" />