I have an EditText
with the property:
android:minLines="3"
However, when I start typing, it types in the middle of the EditText
.
Is there any way to get this to start typing at the top left of the EditText
area?
Say in your xml's edittext section, add android:paddingLeft="100dp" This will move your start position of cursor 100dp right from left end. Same way, you can use android:paddingRight="100dp" This will move your end position of cursor 100dp left from right end.
For the above requirement the solution in XML is android:editable="false" but I want to use this in Java. et. setKeyListener(null); It makes the EditText not EDITABLE but at the same time it makes it non clickable as well.
try this android:windowSoftInputMode="adjustResize" in your activity in manifest file.
Add android:gravity="top|left"
to the EditText
in the layout XML file.
Just insert
android:gravity="top"
into your EditText.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With