如何包装一个preference称号? (真) [英] How to wrap a preference title? (Really)

查看:167
本文介绍了如何包装一个preference称号? (真)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请不要点我如何包装preference称号? ,因为它没有为那里的情况下工作(如我评论)您使用 @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 titles 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称号? (真)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆