开发者

How to show the copyright symbol in a Android dialog?

开发者 https://www.devze.com 2023-01-07 05:44 出处:网络
I have to show copyright symbol: © in the message of an AlertDialog. I set a string value with the copyright symbol in res/string. But the symbol is shown as a question mark when the dialog opens. Ho

I have to show copyright symbol: © in the message of an AlertDialog. I set a string value with the copyright symbol in res/string. But the symbol is shown as a question mark when the dialog opens. How can开发者_StackOverflow中文版 I correctly show the copyright symbol in the dialog. Thanks.


You can also use the Unicode character for this: "\u00A9 2010 Test"


Use © to write © in a String resource:

Copyright © Acme Industries, Inc

becomes

Copyright © Acme Industries, Inc


Write it this way:

> String copyright = "Copyright \u00a9 2013, ajdeguzman";


Use "\u00a9" it is working exactly as required.


very simple, try adding \ before @

0

精彩评论

暂无评论...
验证码 换一张
取 消