Groups
Groups
Sign in
Groups
Groups
日本Androidの会
Conversations
About
Send feedback
Help
strings.xmlにスペースを含む値を設定したい
6,346 views
Skip to first unread message
triplane
unread,
Mar 8, 2011, 7:35:54 PM
3/8/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Androidの会
いつも勉強させていただいております。
早速ですが、strings.xmlに設定する値で、文字列の先頭に半角スペースがある場合、アプリ側の表示ではその半角スペースが除去されてしまって
いるようです。
文字列の途中にある場合はOKみたいなのですが。
これってそもそもXMLの仕様なのかもしれませんが、解決する方法(半角スペースも文字として扱う)はあるのでしょうか?
ご教示いただけるとありがたいです。
よろしくお願いいたします。
u1aryz
unread,
Mar 8, 2011, 8:07:04 PM
3/8/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Androidの会
はじめましてu1aryzと申します。
文字列をダブルクォーテーションで括ることで実現可能です。
尚、ダブルクォーテーションは表示されません。
例
<string name="hello">" Hello World, MyActivity!"</string>
triplane
unread,
Mar 8, 2011, 9:42:03 PM
3/8/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Androidの会
u1aryzさん
ご教示ありがとうございます。
なんと、そうだったんですね。
目から鱗でした。
勉強になりました。
ありがとうございます!!
Reply all
Reply to author
Forward
0 new messages