LuminiousAndroid
LuminiousAndroid

Reputation: 1577

Underline text inside Editbox

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.

Upvotes: 0

Views: 199

Answers (2)

Kaushik
Kaushik

Reputation: 6162

For underline effect in EditText you need to add this

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

Upvotes: 0

Tushar Pandey
Tushar Pandey

Reputation: 4857

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.

Upvotes: 1

Related Questions