5

I tried to learn Android and decide to create SettingsActivity. But I got the problem that I cannot see any text at PreferenceScreen. My PreferenceScreen is white in design mode, so I cannot see any text there.

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <PreferenceCategory app:title="@string/messages_header">

        <EditTextPreference
            app:key="signature"
            app:title="@string/signature_title"
            app:useSimpleSummaryProvider="true" />

        <ListPreference
            app:defaultValue="reply"
            app:entries="@array/reply_entries"
            app:entryValues="@array/reply_values"
            app:key="reply"
            app:title="@string/reply_title"
            app:useSimpleSummaryProvider="true" />

    </PreferenceCategory>

    <PreferenceCategory app:title="@string/sync_header">

        <SwitchPreferenceCompat
            app:key="sync"
            app:title="@string/sync_title" />

        <SwitchPreferenceCompat
            app:dependency="sync"
            app:key="attachment"
            app:summaryOff="@string/attachment_summary_off"
            app:summaryOn="@string/attachment_summary_on"
            app:title="@string/attachment_title" />

    </PreferenceCategory>
    <PreferenceCategory
        app:title="@string/help_header">
    </PreferenceCategory>

</PreferenceScreen>

no text in design mode

My project is almost empty and Android Studio was fresh installed.

Mentos
  • 168
  • 12

1 Answers1

0

I had the same thing. Text only started to appear after I replaced app:title with android:title. Problem is that I don't know why yet.

E. van Putten
  • 615
  • 7
  • 17