gpt4 book ai didi

android - PreferenceScreen 之间的分隔符

转载 作者:行者123 更新时间:2023-11-29 23:28:27 26 4
gpt4 key购买 nike

迁移到 AndroidX 并将目标 SDK 升级到 28 后,我的 SettingsPage 丢失了 PreferenceScreen 组件之间的分隔线,并且文本未左对齐。谁能帮忙?

`

<PreferenceScreen android:title="@string/dummy_string_1">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="@string/app_package_name" />
</PreferenceScreen>

<PreferenceScreen android:title="@string/dummy_string_2">

<intent
android:action="android.intent.action.VIEW"
android:targetPackage="@string/app_package_name" />

</PreferenceScreen>

<PreferenceScreen android:title="@string/dummy_string_3">

<intent
android:action="android.intent.action.VIEW"
android:targetPackage="@string/app_package_name" />

</PreferenceScreen>

`

This is how it looks now, without dividers and text is not left aligned

最佳答案

使用分隔线创建您自己的布局,然后添加以下标签:

android:layout="@layout/divider_preference"

关于android - PreferenceScreen 之间的分隔符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53120438/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com