underline textview
Android2014. 11. 19. 10:03
SpannableString
String udata="SpannableString underline sample"; SpannableString content = new SpannableString(udata); content.setSpan(new UnderlineSpan(), 0, udata.length(), 0); mTextView.setText(content);
setPaintFlags
mTextView.setPaintFlags(mTextView.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); mTextView.setText("Paint flag underline sample");
Html.fromHtml
String htmlString="Html from underline sample"; mTextView.setText(Html.fromHtml(htmlString));
'Android' 카테고리의 다른 글
[Android] Fragment에서 onActivityResult 결과 받기. (1) | 2015.10.02 |
---|---|
[Android] Hexagon Image 만들기. (0) | 2014.12.23 |
[Android] Excution failed for task ':app:preDexDebug' troubleshooting. (0) | 2014.10.17 |
[Android] MediaCodec 을 이용한 player 만들기. (6) | 2014.08.19 |
[Android] Android Library project를 ant로 build 시 renderscript.opt.level Troubleshooting (0) | 2014.07.21 |