I have a layout that adds textviews dynamically and i want to divide each textview with a line.
Something like that:
TextView
TextView
If you want to add programmatically then do this:
mTextView.setPaintFlags(mTextView.getPaintFlags()| Paint.UNDERLINE_TEXT_FLAG);
or you can add this to strings.xml:
This is an underline.
or :
SpannableString spannableStringObject= new SpannableString("Your text here");
spannableStringObject.setSpan(new UnderlineSpan(), 0,
spannableStringObject.length(), 0);
textView.setText(spannableStringObject);