Sunday, March 18, 2012

How to display escape charaters in android?


"  ----------------->  "
'  ------------------>  '
< ----------------->  &lt ;
> ----------------->  &gt;
& ----------------->  &amp;

For example ......
<TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="You&apos;ve made it back after a notification, yay!" />

It will print "You've made it back after a notification,yay!" in TextView

No comments:

Post a Comment