I tried to align the text inside my edit text right but I don't want to use gravity as gravity property (I don't know why) hiding my edit text when softkeypad appears. So, is there any alternative to gravity and of course layout gravity property for edit text?
Alternative of gravity property in relativr layout to align contents of edit text right
70 views Asked by Nitin Verma At
2
There are 2 answers
1
On
Sounds to me like your problem is that you don't want the keyboard to cover your EditText. I would leave the gravity alone (since that's the correct way to align the text inside the field) and consult this answer on how to protect from having the keyboard obstruct your field.
If you're using a Horizontal Linear Layout, you can try adding:
just before the edittext.