How to escape '%' in android preferences

affseo

New Member
I have read this thread FATAL EXCEPTION main Android App and it is very helpful.And YES this works nice \[code\]<string formatted="false">some text and % in the text</string>\[/code\]so if someone uses xml the formatted="false" is the solution.But I have problem in the code\[code\]getPreferenceScreen().findPreference("my_key").setSummary("some text and % in the text"));\[/code\]and this trows an exception, does anybody knows how can I escape the % ?so when the String.format() is called the % will be treated like '%' and not like an special characterThanks
 
Back
Top