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?
Asked
Active
Viewed 67 times
0
-
possible duplicate of [Android soft keyboard covers edittext field](http://stackoverflow.com/questions/3295672/android-soft-keyboard-covers-edittext-field) – Yevgeny Simkin Jun 17 '15 at 18:52
2 Answers
0
If you're using a Horizontal Linear Layout, you can try adding:
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>
just before the edittext.

TheScarecrow
- 153
- 9
0
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.

Community
- 1
- 1

Yevgeny Simkin
- 27,946
- 39
- 137
- 236
-
already used these things and i am using ems property of edit text as well – Nitin Verma Jun 18 '15 at 03:58