Underline text inside Editbox

190 views Asked by At

As I enter text in editText it should automatically underline the text I entered. I need like as I continue to enter text in editText it draw like in background.

Can someone help me.

2

There are 2 answers

0
Tushar Pandey On

Use view with 1 dp of height and custom width with green background , inside framelayout over your editText, and handle custom_width same as you are handling image_width.

0
Kaushik On

For underline effect in EditText you need to add this

//initialize edittext before
editText.setPaintFlags(Paint.UNDERLINE_TEXT_FLAG);