<?xml version="1.0" encoding="utf-8"?>
<!--
/**
 * Copyright (C) 2017 AICP
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
    android:title="@string/slim_recents_title">

    <com.cherish.settings.preferences.SystemSettingSeekBarPreference
        android:key="recent_panel_scale_factor"
        android:title="@string/recent_panel_scale_title"
        settings:min="60"
        settings:interval="5"
        android:max="160"
        android:defaultValue="100"
        settings:units="%" />

    <net.margaritov.preference.colorpicker.ColorPickerPreference
        android:key="recent_panel_bg_color"
        android:title="@string/recent_panel_bg_color_title"
        settings:defaultColorValue="0x00ffffff"
        alphaSlider="true" />

    <net.margaritov.preference.colorpicker.ColorPickerPreference
        android:key="recent_card_bg_color"
        android:title="@string/recent_card_bg_color_title"
        settings:defaultColorValue="0x00ffffff"
        alphaSlider="true" />

    <com.cherish.settings.preferences.SystemSettingSeekBarPreference
        android:key="recents_max_apps"
        android:title="@string/recents_max_apps_title"
        android:defaultValue="15"
        settings:min="5"
        android:max="105" />

    <SwitchPreference
        android:key="recent_panel_lefty_mode"
        android:title="@string/recent_panel_lefty_mode_title"
        android:summary="@string/recent_panel_lefty_mode_summary"
        android:defaultValue="false" />

    <com.cherish.settings.preferences.SystemSettingListPreference
        android:key="slim_recent_enter_exit_animation"
        android:title="@string/slim_recents_enter_exit_animation_title"
        android:entries="@array/slim_recents_enter_exit_animation_entries"
        android:entryValues="@array/slim_recents_enter_exit_animation_values"
        android:defaultValue="0" />

    <com.cherish.settings.preferences.SystemSettingSeekBarPreference
        android:key="slim_recents_corner_radius"
        android:title="@string/slim_recents_corner_radius_title"
        settings:min="0"
        android:max="20"
        android:defaultValue="8"
        settings:units="dp" />

    <com.cherish.settings.preferences.SystemSettingListPreference
        android:key="recent_panel_expanded_mode"
        android:entries="@array/recent_panel_expanded_mode_entries"
        android:entryValues="@array/recent_panel_expanded_mode_values"
        android:title="@string/recent_panel_expanded_mode_title"
        android:summary="@string/recent_panel_expanded_mode_summary"
        android:defaultValue="0" />

    <Preference
        android:key="slim_icon_pack"
        android:title="@string/slim_icon_pack_title"
        android:summary="@string/slim_icon_pack_summary" />

    <PreferenceScreen
        android:key="blacklist_fragment"
        android:fragment="com.cherish.settings.fragments.SlimRecentsBlacklist"
        android:title="@string/slim_blacklist_apps_title"
        android:summary="@string/slim_blacklist_apps_summary" />

    <PreferenceCategory
        android:title="@string/recent_app_sidebar_cat_title">

        <com.cherish.settings.preferences.SystemSettingSwitchPreference
            android:key="use_recent_app_sidebar"
            android:title="@string/recent_app_sidebar_title"
            android:summary="@string/recent_app_sidebar_summary"
            android:defaultValue="true" />

        <PreferenceScreen
            android:key="recent_app_sidebar"
            android:title="@string/recent_app_sidebar_picker_title"
            android:summary="@string/recent_app_sidebar_picker_summary"
            android:fragment="com.cherish.settings.preferences.dslv.ActionListViewSettings"
            android:dependency="use_recent_app_sidebar" >
            <extra android:name="actionMode" android:value="7" />
            <extra android:name="maxAllowedActions" android:value="-1" />
            <extra android:name="useAppPickerOnly" android:value="true" />
            <extra android:name="fragment" android:value="com.cherish.settings.fragments.SlimRecentAppSidebar" />
        </PreferenceScreen>

        <PreferenceScreen
            android:key="recent_app_sidebar_fragment"
            android:fragment="com.cherish.settings.fragments.SlimRecentAppSidebarStyle"
            android:title="@string/recent_app_sidebar_style_title"
            android:summary="@string/recent_app_sidebar_style_summary"
            android:dependency="use_recent_app_sidebar" />
    </PreferenceCategory>

    <PreferenceCategory
        android:title="@string/slim_recents_mem_display_category_title">

        <com.cherish.settings.preferences.SystemSettingSwitchPreference
            android:key="slim_recents_mem_display"
            android:title="@string/slim_recents_mem_display_title"
            android:summary="@string/slim_recents_mem_display_summary"
            android:defaultValue="false" />

        <com.cherish.settings.preferences.SystemSettingSwitchPreference
            android:key="slim_recents_mem_display_long_click_clear"
            android:title="@string/slim_recents_mem_display_long_click_clear_title"
            android:summary="@string/slim_recents_mem_display_long_click_clear_summary"
            android:defaultValue="false"
            android:dependency="slim_recents_mem_display" />

        <net.margaritov.preference.colorpicker.ColorPickerPreference
            android:key="slim_mem_bar_color"
            android:title="@string/slim_recents_mem_display_color"
            settings:defaultColorValue="0xffffffff"
            android:dependency="slim_recents_mem_display"/>

        <net.margaritov.preference.colorpicker.ColorPickerPreference
            android:key="slim_mem_text_color"
            android:title="@string/slim_recents_mem_display_text_color"
            settings:defaultColorValue="0xffffffff"
            android:dependency="slim_recents_mem_display"/>

    </PreferenceCategory>
</PreferenceScreen>
