如何包装preference称号?称号、preference

2023-09-06 00:26:37 作者:孤独患者i

在这幅画,标题我 preference 不环绕它的父。

我怎样才能使标题换到一个新行?

感谢。

XML:

 <复选框preference
        机器人:键=键preF
        机器人:总结=摘要文本并围绕边框包裹
        机器人:标题=这个preference的标题是>
< /复选框preference>
 

解决方案 altium designer protel 封装修改后,封装名称不变,但从原理图导入PCB时封装并不更新,如何解决

您需要做它类似于默认的(机器人内部)复选框preference自定义布局。在标题中的XML文本视图应该与ellipsize设置为马凯,重复限制无限期和滚动设置为横向。比你可以设置的复选框preference与布局:

 <复选框preference
    机器人:关键=key_checkbox_ preF
    机器人:总结=摘要文本并围绕边框包裹
    机器人:标题=这个preference标题
    机器人:布局=@布局/ custom_checkbox_ preferences_layout>
 

希望将工作;)

In this picture, the title of my Preference does not wrap around its parent.

How can I make the title wrap to a new line?

Thanks.

xml:

<CheckBoxPreference
        android:key="keypref"
        android:summary="Summary text does wrap around the borders"
        android:title="The title of this preference is" >
</CheckBoxPreference>

解决方案

You would need to make custom layout which resembles default (android internal) CheckBoxPreference. In that xml text view of title should be with ellipsize set to Marque, repeat limit indefinite and scrollable set to horizontal. Than you can set layout of CheckBoxPreference with:

<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">

Hope that would work ;)

 
精彩推荐
图片推荐