android – 如何包装首选项标题?

android – 如何包装首选项标题?,第1张

概述在这张图片中,我的偏好标题并没有包裹其父母. 如何将标题换行到新行? 谢谢. XML: <CheckBoxPreference android:key="keypref" android:summary="Summary text does wrap around the borders" android:title="The title of th 在这张图片中,我的偏好标题并没有包裹其父母.

如何将标题换行到新行?

谢谢.

XML:

<CheckBoxPreference        androID:key="keypref"        androID:summary="Summary text does wrap around the borders"        androID:title="The Title of this preference is" ></CheckBoxPreference>
解决方法 您需要进行类似默认(androID内部)CheckBoxPreference的自定义布局.在标题的xml文本视图中,ellipsize设置为Marque,重复限制无限期,可滚动设置为水平.您可以使用以下命令设置CheckBoxPreference的布局:
<CheckBoxPreference    androID:key="key_checkBox_pref"    androID:summary="Summary text does wrap around the borders"    androID:title="The Title of this preference."    androID:layout="@layout/custom_checkBox_preferences_layout">

希望这会奏效;)

总结

以上是内存溢出为你收集整理的android – 如何包装首选项标题?全部内容,希望文章能够帮你解决android – 如何包装首选项标题?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1138093.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-30
下一篇2022-05-30

发表评论

登录后才能评论

评论列表(0条)

    保存