Luk*_*kap 2 xml string android android-preferences
我已经阅读了这个线程FATAL EXCEPTION主要Android应用程序,它是非常有帮助的.
是的,这很好用
<string formatted="false">some text and % in the text</string>
Run Code Online (Sandbox Code Playgroud)
所以如果有人使用xml格式化的="false"就是解决方案.
但我的代码有问题
getPreferenceScreen().findPreference("my_key").setSummary("some text and % in the text"));
Run Code Online (Sandbox Code Playgroud)
这有一个例外,有谁知道如何逃脱%?
因此,当调用String.format()时,%将被视为'%'而不是特殊字符
谢谢
小智 6
加倍吧!而不是使用百分之一,使用两个.像这样.
setSummary("some text and %% in the text")
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
506 次 |
| 最近记录: |