问题描述
请不要点我,因为它没有为那里的情况下工作(如我评论)您使用 @strings /
参照的strings.xml 文件。
Please don't point me to How to wrap preference title? as it doesn't work for the case where (as I commented) you use a @strings/
reference to a strings.xml file.
如果您使用
的android:标题=@字符串/ some_string
,把
<字符串名称=some_string>该字符串我想\\ n包装< /串>
到的strings.xml 的 \\ n
将被忽略。
推荐答案
我想所有的标题
取值preference屏内预计将单行
我不认为声明为的android:标题=
将工作这一preference \\的标题NIS这一点。这也将忽略 \\ n
。
I think all title
s inside preference screen are expected to be single line.
I don't think declaring as android:title="The title of this preference\nis this."
will work. This will also ignore \n
.
所以,我的建议是,让标题一行,并做一个总结来形容了。
So, my suggestion is, make title single line and make a summary to describe it.
<CheckBoxPreference android:key="extention"
android:title="@string/title"
android:summary="@string/summary"
android:defaultValue="true"
/>
请注意: \\ n
将汇总工作。
这篇关于如何包装一个preference称号? (真)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!