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

    <PreferenceCategory
        a:key="serversKey"
        a:title="@string/settings.servers_title"
        app:iconSpaceReserved="false">
        <Preference
            a:key="editServers"
            a:title="@string/settings.server_manage_servers"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>
    <PreferenceCategory
        a:title="@string/settings.appearance_title"
        app:iconSpaceReserved="false">
        <ListPreference
            a:defaultValue="@string/preferences_key_theme_dark"
            a:entries="@array/themeNames"
            a:entryValues="@array/themeValues"
            a:key="theme"
            a:title="@string/settings.theme_title"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="true"
            a:key="serverScaling"
            a:summary="@string/settings.server_scaling_summary"
            a:title="@string/settings.server_scaling_title"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="true"
            a:key="displayBitrateWithArtist"
            a:summary="@string/settings.display_bitrate_summary"
            a:title="@string/settings.display_bitrate"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="useFolderForAlbumArtist"
            a:summary="@string/settings.use_folder_for_album_artist_summary"
            a:title="@string/settings.use_folder_for_album_artist"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="showAllSongsByArtist"
            a:summary="@string/settings.show_all_songs_by_artist_summary"
            a:title="@string/settings.show_all_songs_by_artist"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="true"
            a:key="showTrackNumber"
            a:summary="@string/settings.show_track_number_summary"
            a:title="@string/settings.show_track_number"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="discAndTrackSort"
            a:summary="@string/settings.disc_sort_summary"
            a:title="@string/settings.disc_sort"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="1000"
            a:entries="@array/viewRefreshNames"
            a:entryValues="@array/viewRefreshValues"
            a:key="viewRefresh"
            a:title="@string/settings.view_refresh"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="5"
            a:entries="@array/imageConcurrencyNames"
            a:entryValues="@array/imageConcurrencyValues"
            a:key="imageLoaderConcurrency"
            a:title="@string/settings.image_loader_concurrency"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>
    <PreferenceCategory
        a:title="@string/settings.playback_control_title"
        a:key="playbackControlSettings"
        app:iconSpaceReserved="false">
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="useId3Tags"
            a:summary="@string/settings.use_id3_summary"
            a:title="@string/settings.use_id3"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="showArtistPicture"
            a:summary="@string/settings.show_artist_picture_summary"
            a:title="@string/settings.show_artist_picture"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="true"
            a:key="mediaButtons"
            a:summary="@string/settings.media_button_summary"
            a:title="@string/settings.media_button_title"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="true"
            a:key="transitionToDownloadOnPlay"
            a:summary="@string/settings.download_transition_summary"
            a:title="@string/settings.download_transition"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="gaplessPlayback"
            a:summary="@string/settings.gapless_playback_summary"
            a:title="@string/settings.gapless_playback"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="clearPlaylist"
            a:summary="@string/settings.clear_playlist_summary"
            a:title="@string/settings.clear_playlist"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="clearBookmark"
            a:summary="@string/settings.clear_bookmark_summary"
            a:title="@string/settings.clear_bookmark"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="5000"
            a:entries="@array/bufferLengthNames"
            a:entryValues="@array/incrementTimeValues"
            a:key="incrementTime"
            a:title="@string/settings.increment_time"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="@string/settings.playback.resume_play_on_headphones_plug"
            a:title="@string/settings.playback.resume_play_on_headphones_plug.title"
            a:summary="@string/settings.playback.resume_play_on_headphones_plug.summary"
            app:iconSpaceReserved="false"/>
        <Preference
            a:key="resumeOnBluetoothDevice"
            a:title="@string/settings.playback.resume_on_bluetooth_device"
            app:iconSpaceReserved="false"/>
        <Preference
            a:key="pauseOnBluetoothDevice"
            a:title="@string/settings.playback.pause_on_bluetooth_device"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="singleButtonPlayPause"
            a:summary="@string/settings.playback.single_button_bluetooth_device_summary"
            a:title="@string/settings.playback.single_button_bluetooth_device"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>
    <PreferenceCategory
        a:title="@string/settings.notifications_title"
        a:key="notificationsCategory"
        app:iconSpaceReserved="false">
        <CheckBoxPreference
            a:defaultValue="true"
            a:key="showNowPlaying"
            a:summary="@string/settings.show_now_playing_summary"
            a:title="@string/settings.show_now_playing"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="true"
            a:key="showNotification"
            a:summary="@string/settings.show_notification_summary"
            a:title="@string/settings.show_notification"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="true"
            a:key="alwaysShowNotification"
            a:summary="@string/settings.show_notification_always_summary"
            a:title="@string/settings.show_notification_always"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="true"
            a:key="showLockScreen"
            a:summary="@string/settings.show_lockscreen_controls_summary"
            a:title="@string/settings.show_lockscreen_controls"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="true"
            a:key="sendBluetoothNotifications"
            a:summary="@string/settings.send_bluetooth_notification_summary"
            a:title="@string/settings.send_bluetooth_notification"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="sendBluetoothAlbumArt"
            a:summary="@string/settings.send_bluetooth_album_art_summary"
            a:title="@string/settings.send_bluetooth_album_art"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>
    <PreferenceCategory
        a:title="@string/settings.video_title"
        app:iconSpaceReserved="false">
        <ListPreference
            a:defaultValue="default"
            a:entries="@array/videoPlayerNames"
            a:entryValues="@array/videoPlayerValues"
            a:key="videoPlayer"
            a:title="@string/settings.video_player"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>
    <PreferenceCategory
        a:title="@string/settings.sharing_title"
        app:iconSpaceReserved="false">
        <EditTextPreference
            a:key="sharingDefaultDescription"
            a:title="@string/settings.share_description_default"
            app:iconSpaceReserved="false"/>
        <EditTextPreference
            a:key="sharingDefaultGreeting"
            a:title="@string/settings.share_greeting_default"
            app:iconSpaceReserved="false"/>
        <org.moire.ultrasonic.util.TimeSpanPreference
            a:defaultValue="0"
            a:key="sharingDefaultExpiration"
            a:title="@string/settings.share_expiration_default"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="true"
            a:key="sharingAlwaysAskForDetails"
            a:summary="@string/settings.sharing_always_ask_for_details_summary"
            a:title="@string/settings.sharing_always_ask_for_details"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>
    <PreferenceCategory
        a:title="@string/settings.network_title"
        app:iconSpaceReserved="false">
        <ListPreference
            a:defaultValue="0"
            a:entries="@array/maxBitrateNames"
            a:entryValues="@array/maxBitrateValues"
            a:key="maxBitrateWifi"
            a:title="@string/settings.max_bitrate_wifi"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="0"
            a:entries="@array/maxBitrateNames"
            a:entryValues="@array/maxBitrateValues"
            a:key="maxBitrateMobile"
            a:title="@string/settings.max_bitrate_mobile"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="wifiRequiredForDownload"
            a:summary="@string/settings.wifi_required_summary"
            a:title="@string/settings.wifi_required_title"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="5"
            a:entries="@array/bufferLengthNames"
            a:entryValues="@array/bufferLengthValues"
            a:key="bufferLength"
            a:title="@string/settings.buffer_length"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="15000"
            a:entries="@array/networkTimeoutNames"
            a:entryValues="@array/networkTimeoutValues"
            a:key="networkTimeout"
            a:title="@string/settings.network_timeout"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="5000"
            a:entries="@array/chatRefreshNames"
            a:entryValues="@array/chatRefreshValues"
            a:key="chatRefreshInterval"
            a:title="@string/settings.chat_refresh"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>
    <PreferenceCategory
        a:title="@string/settings.cache_title"
        app:iconSpaceReserved="false">
        <ListPreference
            a:defaultValue="500"
            a:entries="@array/cacheSizeNames"
            a:entryValues="@array/cacheSizeValues"
            a:key="cacheSize"
            a:title="@string/settings.cache_size"
            app:iconSpaceReserved="false"/>
        <Preference
            a:key="cacheLocation"
            a:title="@string/settings.cache_location"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="3"
            a:entries="@array/preloadCountNames"
            a:entryValues="@array/preloadCountValues"
            a:key="preloadCount"
            a:title="@string/settings.preload"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="300"
            a:entries="@array/directoryCacheTimeNames"
            a:entryValues="@array/directoryCacheTimeValues"
            a:key="directoryCacheTime"
            a:title="@string/settings.directory_cache_time"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>
    <PreferenceCategory
        a:title="@string/settings.search_title"
        app:iconSpaceReserved="false">
        <ListPreference
            a:defaultValue="3"
            a:entries="@array/searchNames"
            a:entryValues="@array/searchValues"
            a:key="defaultArtists"
            a:title="@string/settings.default_artists"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="10"
            a:entries="@array/searchNames"
            a:entryValues="@array/searchValues"
            a:key="maxArtists"
            a:title="@string/settings.max_artists"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="5"
            a:entries="@array/searchNames"
            a:entryValues="@array/searchValues"
            a:key="defaultAlbums"
            a:title="@string/settings.default_albums"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="20"
            a:entries="@array/searchNames"
            a:entryValues="@array/searchValues"
            a:key="maxAlbums"
            a:title="@string/settings.max_albums"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="10"
            a:entries="@array/searchNames"
            a:entryValues="@array/searchValues"
            a:key="defaultSongs"
            a:title="@string/settings.default_songs"
            app:iconSpaceReserved="false"/>
        <ListPreference
            a:defaultValue="25"
            a:entries="@array/searchNames"
            a:entryValues="@array/searchValues"
            a:key="maxSongs"
            a:title="@string/settings.max_songs"
            app:iconSpaceReserved="false"/>
        <Preference
            a:key="clearSearchHistory"
            a:persistent="false"
            a:title="@string/settings.clear_search_history"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>
    <PreferenceCategory
        a:title="@string/settings.other_title"
        app:iconSpaceReserved="false">
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="scrobble"
            a:summary="@string/settings.scrobble_summary"
            a:title="@string/settings.scrobble_title"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="hideMedia"
            a:summary="@string/settings.hide_media_summary"
            a:title="@string/settings.hide_media_title"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:defaultValue="true"
            a:key="screenLitOnDownload"
            a:summary="@string/settings.screen_lit_summary"
            a:title="@string/settings.screen_lit_title"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>
    <PreferenceCategory
        a:title="@string/feature_flags_category_title"
        app:iconSpaceReserved="false">
        <CheckBoxPreference
            a:key="ff_new_image_loader"
            a:persistent="false"
            a:title="@string/feature_flags_image_loader_title"
            a:summary="@string/feature_flags_image_loader_description"
            app:iconSpaceReserved="false"/>
        <CheckBoxPreference
            a:key="use_five_star_rating"
            a:persistent="false"
            a:title="@string/feature_flags_five_star_rating_title"
            a:summary="@string/feature_flags_five_star_rating_description"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>
    <PreferenceCategory
        a:title="@string/settings.debug.title"
        app:iconSpaceReserved="false">
        <CheckBoxPreference
            a:defaultValue="false"
            a:key="debugLogToFile"
            a:title="@string/settings.debug.log_to_file"
            a:summary=""
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>

</PreferenceScreen>