【发布时间】:2017-01-06 08:54:24
【问题描述】:
我在 android studio 中使用了设置活动模板(首选项),但我有这个布局。my XML
但我希望布局看起来像这样 new XML
我完成了用 Photoshop 创建顶部栏“帮助”,如何添加顶部栏“帮助”,就像我的自定义布局一样?谢谢。
这是我的代码(pref_headers.xml):
<header
android:fragment="com.example.hp.refomandaapps.SettingsActivity$NotificationPreferenceFragment"
android:icon="@drawable/ic_notifications_black_24dp"
android:title="@string/pref_header_notifications" />
<header
android:fragment="com.example.hp.refomandaapps.SettingsActivity$DataSyncPreferenceFragment"
android:icon="@drawable/ic_sync_black_24dp"
android:title="@string/pref_header_data_sync" />
【问题讨论】:
标签: android xml settings preference