How-to-underline-textview-in-android

If you want to underline TextView in Android you can use this code:

        SpannableString contentUnderline = new SpannableString("some text here");
        contentUnderline.setSpan(new UnderlineSpan(), 0, contentUnderline.length(), 0);
        TextView TextViewCopyright = (TextView) findViewById(R.id.TextView01);
        TextViewCopyright.setText(contentUnderline);


Special thanks to Eli.

Posted in Android, Java at March 21st, 2011. 1 Comment.

How to show copyright symbol in textview

If you want to show copyright symbol © in the TextView, you can use the Unicode character for this: “\u00A9”

    <string name="copyright">\u00A9 2011 copyright</string>

or to use ©

    <string name="copyright">&#169; 2011 copyright</string>
Posted in Android, Java at March 20th, 2011. No Comments.