I want to draw the underline below my TextView. I have searched a few content but couldn't find out anything fruitful.
Can anyone please help me out here?
I want to draw the underline below my TextView. I have searched a few content but couldn't find out anything fruitful.
Can anyone please help me out here?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Ravi RupareliyaRank #1,866 · 799 reputationPosted Jun 7, 2016, 4:40 AM EDT
1st approach
2nd Approach
3rd Approach
Hardik Mahant18 reputationPosted Jun 3, 2016, 4:16 AM EDT
In android there is no any parameter or a property for set a underline on textview.
So,I suggest make a view with a background color(color which you want as underline color), height as 1dp & adjust a width as per your textview,adjust it below of textview this is a simplest way to get an underline with TextView.
Otherwise you can get underline like this