<?xml version="1.0" encoding="utf-8"?>
<!--suppress AndroidElementNotAllowed -->
<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:key="settings_content"
    android:title="@string/content_and_storage">

    <org.mariotaku.twidere.preference.TintedPreferenceCategory
        android:key="category_content"
        android:title="@string/content">

        <SwitchPreferenceCompat
            android:defaultValue="true"
            android:key="name_first"
            android:summaryOff="@string/name_first_summary_off"
            android:summaryOn="@string/name_first_summary_on"
            android:title="@string/name_first">
            <extra
                android:name="should_recreate"
                android:value="true"/>
        </SwitchPreferenceCompat>

        <org.mariotaku.twidere.preference.SeekBarDialogPreference
            android:defaultValue="20"
            android:key="load_item_limit"
            android:summary="@string/load_item_limit_summary"
            android:title="@string/load_item_limit"
            app:max="200"
            app:min="10"
            app:step="5"/>

        <SwitchPreferenceCompat
            android:defaultValue="true"
            android:key="remember_position"
            android:summary="@string/remember_position_summary"
            android:title="@string/remember_position"/>
        <SwitchPreferenceCompat
            android:defaultValue="false"
            android:key="read_from_bottom"
            android:summaryOff="@string/read_from_bottom_summary_off"
            android:summaryOn="@string/read_from_bottom_summary_on"
            android:title="@string/read_from_bottom"/>

        <Preference
            android:enabled="false"
            android:summary="@string/preference_summary_trends_location"
            android:title="@string/preference_title_trends_location"/>

        <org.mariotaku.twidere.preference.ComponentStatePreference
            android:name="org.mariotaku.twidere.activity.WebLinkHandlerActivity"
            android:key="twitter_link_handler"
            android:title="@string/open_twitter_links"/>
        <Preference
            android:fragment="org.mariotaku.twidere.fragment.KeyboardShortcutsFragment"
            android:title="@string/keyboard_shortcuts"/>

        <org.mariotaku.twidere.preference.MediaUploaderPreference
            android:defaultValue=""
            android:key="media_uploader"
            android:summary="%s"
            android:title="@string/media_uploader"/>

        <SwitchPreferenceCompat
            android:defaultValue="true"
            android:enabled="@bool/support_new_document_intent"
            android:key="new_document_api"
            android:summary="@string/preference_multitasking_summary"
            android:title="@string/preference_multitasking"/>

        <SwitchPreferenceCompat
            android:defaultValue="true"
            android:key="chrome_custom_tab"
            android:summary="@string/preference_summary_chrome_custom_tab"
            android:title="@string/preference_title_chrome_custom_tab"/>

    </org.mariotaku.twidere.preference.TintedPreferenceCategory>

    <org.mariotaku.twidere.preference.TintedPreferenceCategory
        android:key="category_safety"
        android:title="@string/safety">
        <SwitchPreferenceCompat
            android:defaultValue="true"
            android:key="phishing_link_warning"
            android:summary="@string/phishing_link_warning_summary"
            android:title="@string/phishing_link_warning"/>
        <SwitchPreferenceCompat
            android:defaultValue="false"
            android:key="display_sensitive_contents"
            android:summary="@string/display_sensitive_contents_summary"
            android:title="@string/display_sensitive_contents"/>
        <org.mariotaku.twidere.preference.RandomizeAccountNamePreference
            android:defaultValue="false"
            android:key="randomize_account_name"
            android:summary="@string/preference_randomize_account_name_summary"
            android:title="@string/preference_randomize_account_name"/>
    </org.mariotaku.twidere.preference.TintedPreferenceCategory>

</PreferenceScreen>