0

I wanted to make the Edit Text line in my app a custom color, so I used a line drawable xml and set that as my Edit Text background, ala How to change line color in EditText.

The problem is that my drawn lines are now behaving as strikethroughs, rather than appearing at the bottom of the Edit Text. Is there a way to move them down?

Have tried setting android:gravity on both the Edit Text and the drawable.

https://i.stack.imgur.com/ncl9H.png

Community
  • 1
  • 1
callynx
  • 11
  • 1
  • 4

1 Answers1

0

Try Following Code:

<LinearLayout
...
android:orientation="vertical">
     <EditText
     ...
     android:background="@null"/>

     <View
     android:layout_width="match_parent"
     android:layout_height="1dp"
     android:background="@android:color/black"/>
</LinearLayout>
Asif Patel
  • 1,744
  • 1
  • 20
  • 27