Multiline EditText shrinking when focused
-
17-04-2021 - |
Pregunta
I have a multi-link postal address EditText widget which is declared as below:
<EditText
android:id="@+id/pat_address_input"
android:layout_width="250dp"
android:layout_height="100dp"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:height="100dp"
android:inputType="textPostalAddress"
android:lines="5"
android:textColor="@color/white"
android:textSize="10pt" >
</EditText>
In my code, I set the focus property to true and focusontouch to true, however when the EditText widget it focused the EditText shrinks to a single line box and the cursor hangs underneath the widget.
How can I stop this?
Solución 2
This was because the widget was inheriting properties from a single-line edittext
Otros consejos
Try removing the android:lines="5"
, this all worked for me with no issues.
I am also confused as to why your text is white when your background of the field is white.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow