簡體   English   中英

如何顯示PreferenceScreen的摘要

[英]How to have summary of PreferenceScreen show up

我想要一個帶有標題和摘要的全屏PreferenceScreen。 但是,當我提供摘要文本時,它不會顯示:

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
    android:title="My Title"
    android:summary="My Summary">
......

</PreferenceScreen>

將此添加到您擁有的位置。

<PreferenceCategory android:title="Title"
                    android:key="title_category_key">

    <PreferenceScreen
            android:key="my_title_key"
            android:title="Main Settings"
            android:persistent="false" >
    </PreferenceScreen>

        <EditTextPreference
                android:name="title"
                android:defaultValue="@string/title"
                android:title="title"
                android:key="title_key"
                android:editable="false"
                android:focusable="false"/>

 </PreferenceCategory>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM