<?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:allowDividerAbove="false"
        app:title="Apps">
        <eu.ottop.yamlauncher.settings.SpinnerPreference
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:defaultValue="left"
            android:entries="@array/h_alignment_options"
            android:entryValues="@array/h_alignment_values"
            app:key="appMenuAlignment"
            app:title="App Alignment"
            app:useSimpleSummaryProvider="true" />
        <eu.ottop.yamlauncher.settings.SpinnerPreference
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:defaultValue="medium"
            android:entries="@array/size_options"
            android:entryValues="@array/size_values"
            app:key="appMenuSize"
            app:title="App Size"
            app:useSimpleSummaryProvider="true" />
        <eu.ottop.yamlauncher.settings.SpinnerPreference
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:defaultValue="20"
            android:entries="@array/app_spacing_options"
            android:entryValues="@array/app_spacing_values"
            app:key="appSpacing"
            app:title="App Spacing"
            app:useSimpleSummaryProvider="true" />
        <SwitchPreference
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:defaultValue="false"
            android:title="Contacts Menu"
            app:key="contactsEnabled" />

    </PreferenceCategory>
    <PreferenceCategory
        app:allowDividerAbove="false"
        app:title="Search">

        <SwitchPreference
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:defaultValue="true"
            android:title="Enable Search"
            app:key="searchEnabled" />
        <eu.ottop.yamlauncher.settings.SpinnerPreference
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:defaultValue="left"
            app:dependency="searchEnabled"
            android:entries="@array/h_alignment_options"
            android:entryValues="@array/h_alignment_values"
            app:key="searchAlignment"
            app:title="Search Alignment"
            app:useSimpleSummaryProvider="true" />
        <eu.ottop.yamlauncher.settings.SpinnerPreference
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:defaultValue="medium"
            app:dependency="searchEnabled"
            android:entries="@array/size_options"
            android:entryValues="@array/size_values"
            app:key="searchSize"
            app:title="Search Size"
            app:useSimpleSummaryProvider="true" />
        <SwitchPreference
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:defaultValue="false"
            android:title="Automatically Open Keyboard"
            app:dependency="searchEnabled"
            app:key="autoKeyboard" />
        <SwitchPreference
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:defaultValue="false"
            android:title="Automatic App Opening"
            app:dependency="searchEnabled"
            app:key="autoLaunch"
            app:summary="Automatically launch an app when it's the last search result" />

    </PreferenceCategory>

</PreferenceScreen>