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

        <!--  if we move this to another PreferenceGroup, we should update code for the readFromIntent() call -->
        <!--
        <ListPreference 
            android:key="preference_color_effect"
            android:title="@string/preference_color_effect"
            android:summary="@string/preference_color_effect_summary"
            />
        -->
    
        <!--  if we move this to another PreferenceGroup, we should update code for the readFromIntent() call -->
        <!--
        <ListPreference 
            android:key="preference_scene_mode"
            android:title="@string/preference_scene_mode"
            android:summary="@string/preference_scene_mode_summary"
            />
        -->
    
        <!--  if we move this to another PreferenceGroup, we should update code for the readFromIntent() call -->
        <!--
        <ListPreference 
            android:key="preference_white_balance"
            android:title="@string/preference_white_balance"
            android:summary="@string/preference_white_balance_summary"
            />
        -->

        <!--  if we move this to another PreferenceGroup, we should update code for the readFromIntent() call -->
        <!--
        <ListPreference 
            android:key="preference_iso"
            android:title="@string/preference_iso"
            android:summary="@string/preference_iso_summary"
            />
        -->

        <!--  if we move this to another PreferenceGroup, we should update code for the readFromIntent() call -->
        <!--
        <ListPreference
            android:key="preference_exposure"
            android:title="@string/preference_exposure"
            android:summary="@string/preference_exposure_summary"
            />
        -->

        <!--  if we move this to another PreferenceGroup, we should update code for the findPreference() call -->
        <!--
        <SwitchPreference
            android:key="preference_auto_stabilise"
            android:title="@string/preference_auto_stabilise"
            android:summary="@string/preference_auto_stabilise_summary"
            android:defaultValue="false"
            />
        -->

    <!-- </PreferenceCategory> -->

    <PreferenceCategory
        android:key="preference_category_camera_controls"
        android:title="@string/preference_category_camera_controls">

        <!--  if we move this to another PreferenceGroup, we should update code for the findPreference() call -->
        <SwitchPreference
            android:key="preference_face_detection"
            android:title="@string/preference_face_detection"
            android:summary="@string/preference_face_detection_summary"
            android:defaultValue="false"
            />

        <ListPreference
            android:key="preference_timer"
            android:title="@string/preference_timer"
            android:summary="%s"
            android:icon="@drawable/ic_timer_white_48dp"
            android:entries="@array/preference_timer_entries"
            android:entryValues="@array/preference_timer_values"
            android:defaultValue="0"
            />

        <ListPreference 
            android:key="preference_burst_mode"
            android:title="@string/preference_burst_mode"
            android:summary="%s"
            android:entries="@array/preference_burst_mode_entries"
            android:entryValues="@array/preference_burst_mode_values"
            android:defaultValue="1"
            />

        <ListPreference
            android:key="preference_burst_interval"
            android:title="@string/preference_burst_interval"
            android:summary="%s"
            android:entries="@array/preference_burst_interval_entries"
            android:entryValues="@array/preference_burst_interval_values"
            android:defaultValue="0"
            />

        <PreferenceScreen
            android:key="preference_screen_camera_controls_more"
            android:title="@string/preference_screen_camera_controls_more"
            android:icon="@drawable/ic_more_horiz_white_48dp"
            android:persistent="false">

            <ListPreference
                android:key="preference_touch_capture"
                android:title="@string/preference_touch_capture"
                android:summary="@string/preference_touch_capture_summary"
                android:icon="@drawable/ic_touch_app_white_48dp"
                android:entries="@array/preference_touch_capture_entries"
                android:entryValues="@array/preference_touch_capture_values"
                android:defaultValue="none"
                />
    
            <SwitchPreference
                android:key="preference_pause_preview"
                android:title="@string/preference_pause_preview"
                android:summary="@string/preference_pause_preview_summary"
                android:defaultValue="false"
                />
    
            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <SwitchPreference
                android:key="preference_shutter_sound"
                android:title="@string/preference_shutter_sound"
                android:summary="@string/preference_shutter_sound_summary"
                android:defaultValue="true"
                />
    
            <SwitchPreference
                android:key="preference_timer_beep"
                android:title="@string/preference_timer_beep"
                android:summary="@string/preference_timer_beep_summary"
                android:defaultValue="true"
                />
    
            <SwitchPreference
                android:key="preference_timer_speak"
                android:title="@string/preference_timer_speak"
                android:summary="@string/preference_timer_speak_summary"
                android:defaultValue="false"
                />

            <ListPreference 
                android:key="preference_volume_keys"
                android:title="@string/preference_volume_keys"
                android:summary="%s"
                android:entries="@array/preference_volume_keys_entries"
                android:entryValues="@array/preference_volume_keys_values"
                android:defaultValue="volume_take_photo"
                />
        
            <ListPreference
                android:key="preference_audio_control"
                android:title="@string/preference_audio_control"
                android:summary="@string/preference_audio_control_summary"
                android:icon="@drawable/ic_mic_white_48dp"
                android:entries="@array/preference_audio_control_entries"
                android:entryValues="@array/preference_audio_control_values"
                android:defaultValue="none"
                />

            <net.sourceforge.opencamera.ui.ArraySeekBarPreference
                android:key="preference_audio_noise_control_sensitivity"
                android:title="@string/preference_audio_noise_control_sensitivity"
                android:summary="@string/preference_audio_noise_control_sensitivity_summary"
                android:entries="@array/preference_audio_noise_control_sensitivity_entries"
                android:entryValues="@array/preference_audio_noise_control_sensitivity_values"
                android:defaultValue="0"
                />

            <!--  if we move this to another PreferenceScreen, we should update code for the findPreference() call -->
            <PreferenceScreen
                android:key="preference_screen_remote_control"
                android:title="@string/preference_screen_remote_control"
                android:icon="@drawable/ic_more_horiz_white_48dp"
                android:persistent="false">

                <SwitchPreference
                    android:key="preference_enable_remote"
                    android:title="@string/preference_enable_remote"
                    android:summary="@string/preference_enable_remote_summary"
                    android:defaultValue="false"
                    />

                <ListPreference
                    android:key="preference_remote_type"
                    android:title="@string/preference_remote_type"
                    android:summary="%s"
                    android:entries="@array/preference_remote_type_entries"
                    android:entryValues="@array/preference_remote_type_values"
                    android:defaultValue="preference_remote_type_kraken"
                    android:dependency="preference_enable_remote"
                    />

                <PreferenceScreen
                    android:key="preference_remote_device_name"
                    android:title="@string/preference_select_remote"
                    android:dependency="preference_enable_remote"
                    >

                    <intent
                        android:targetPackage="net.sourceforge.opencamera"
                        android:targetClass="net.sourceforge.opencamera.remotecontrol.DeviceScanner"
                        />

                </PreferenceScreen>

                <SwitchPreference
                    android:key="preference_remote_disconnect_screen_dim"
                    android:title="@string/preference_remote_disconnect_screen_dim"
                    android:summary="@string/preference_remote_disconnect_screen_dim_summary"
                    android:defaultValue="false"
                    android:dependency="preference_enable_remote"
                    />

                <SwitchPreference
                    android:key="preference_water_type"
                    android:title="@string/preference_water_type"
                    android:summary="@string/preference_water_type_summary"
                    android:defaultValue="true"
                    android:dependency="preference_enable_remote"
                    />

            </PreferenceScreen>

            <ListPreference
                android:key="preference_lock_orientation"
                android:title="@string/preference_lock_orientation"
                android:summary="@string/preference_lock_orientation_summary"
                android:entries="@array/preference_lock_orientation_entries"
                android:entryValues="@array/preference_lock_orientation_values"
                android:defaultValue="none"
                />

            <Preference
                android:key="preference_save_location"
                android:title="@string/preference_save_location"
                android:summary="@string/preference_save_location_summary"
                android:icon="@drawable/ic_save_white_48dp"
                android:dialogTitle="@string/preference_save_location"
                android:dialogMessage="@string/preference_save_location_summary"
                android:inputType="text"
                android:defaultValue="OpenCamera"
                />
    
            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <SwitchPreference
                android:key="preference_using_saf"
                android:title="@string/preference_using_saf"
                android:summary="@string/preference_using_saf_summary"
                android:defaultValue="false"
                />

            <!-- if the default value changes, remember to update code in MyPreferenceFragment.setSummary() -->
            <EditTextPreference
                android:key="preference_save_photo_prefix"
                android:title="@string/preference_save_photo_prefix"
                android:summary="@string/preference_save_photo_prefix_summary"
                android:dialogTitle="@string/preference_save_photo_prefix"
                android:dialogMessage="@string/preference_save_photo_prefix_summary"
                android:inputType="text"
                android:defaultValue="IMG_"
                />

            <!-- if the default value changes, remember to update code in MyPreferenceFragment.setSummary() -->
            <EditTextPreference
                android:key="preference_save_video_prefix"
                android:title="@string/preference_save_video_prefix"
                android:summary="@string/preference_save_video_prefix_summary"
                android:dialogTitle="@string/preference_save_video_prefix"
                android:dialogMessage="@string/preference_save_video_prefix_summary"
                android:inputType="text"
                android:defaultValue="VID_"
                />

            <ListPreference
                android:key="preference_save_zulu_time"
                android:title="@string/preference_save_zulu_time"
                android:summary="%s"
                android:entries="@array/preference_save_zulu_time_entries"
                android:entryValues="@array/preference_save_zulu_time_values"
                android:defaultValue="local"
                />

           <SwitchPreference
                android:key="preference_show_when_locked"
                android:title="@string/preference_show_when_locked"
                android:summary="@string/preference_show_when_locked_summary"
                android:defaultValue="true"
                />

           <SwitchPreference
                android:key="preference_startup_focus"
                android:title="@string/preference_startup_focus"
                android:summary="@string/preference_startup_focus_summary"
                android:defaultValue="true"
                />

            <SwitchPreference
                android:key="preference_allow_long_press"
                android:title="@string/preference_allow_long_press"
                android:summary="@string/preference_allow_long_press_summary"
                android:defaultValue="true"
                />

            <Preference
                android:key="preference_calibrate_level"
                android:title="@string/preference_calibrate_level"
                android:summary="@string/preference_calibrate_level_summary"
                />

        </PreferenceScreen>

        <PreferenceScreen
            android:key="preference_preview"
            android:title="@string/preference_preview"
            android:icon="@drawable/ic_more_horiz_white_48dp"
            android:persistent="false">

            <ListPreference
                android:key="preference_preview_size"
                android:title="@string/preference_preview_size"
                android:summary="%s"
                android:entries="@array/preference_preview_size_entries"
                android:entryValues="@array/preference_preview_size_values"
                android:defaultValue="preference_preview_size_wysiwyg"
                />

            <ListPreference
                android:key="preference_ghost_image"
                android:title="@string/preference_ghost_image"
                android:summary="@string/preference_ghost_image_summary"
                android:entries="@array/preference_ghost_image_entries"
                android:entryValues="@array/preference_ghost_image_values"
                android:defaultValue="preference_ghost_image_off"
                />

            <net.sourceforge.opencamera.ui.ArraySeekBarPreference
                android:key="ghost_image_alpha"
                android:title="@string/preference_ghost_image_alpha"
                android:summary="@string/preference_ghost_image_alpha_summary"
                android:defaultValue="50"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference
                android:key="preference_focus_assist"
                android:title="@string/preference_focus_assist"
                android:summary="@string/preference_focus_assist_summary"
                android:entries="@array/preference_focus_assist_entries"
                android:entryValues="@array/preference_focus_assist_values"
                android:defaultValue="0"
                />

            <CheckBoxPreference
                android:key="preference_show_zoom"
                android:title="@string/preference_show_zoom"
                android:summary="@string/preference_show_zoom_summary"
                android:defaultValue="true"
                />

            <CheckBoxPreference
                android:key="preference_show_angle"
                android:title="@string/preference_show_angle"
                android:summary="@string/preference_show_angle_summary"
                android:defaultValue="false"
                />

            <CheckBoxPreference
                android:key="preference_show_angle_line"
                android:title="@string/preference_show_angle_line"
                android:summary="@string/preference_show_angle_line_summary"
                android:defaultValue="false"
                />

            <CheckBoxPreference
                android:key="preference_show_pitch_lines"
                android:title="@string/preference_show_pitch_lines"
                android:summary="@string/preference_show_pitch_lines_summary"
                android:defaultValue="false"
                />

            <ListPreference
                android:key="preference_angle_highlight_color"
                android:title="@string/preference_angle_highlight_color"
                android:summary="@string/preference_angle_highlight_color_summary"
                android:entries="@array/preference_angle_highlight_color_entries"
                android:entryValues="@array/preference_angle_highlight_color_values"
                android:defaultValue="#14e715"
                />

            <CheckBoxPreference
                android:key="preference_show_geo_direction"
                android:title="@string/preference_show_geo_direction"
                android:summary="@string/preference_show_geo_direction_summary"
                android:defaultValue="false"
                />

            <CheckBoxPreference
                android:key="preference_show_geo_direction_lines"
                android:title="@string/preference_show_geo_direction_lines"
                android:summary="@string/preference_show_geo_direction_lines_summary"
                android:defaultValue="false"
                />

            <CheckBoxPreference
                android:key="preference_show_battery"
                android:title="@string/preference_show_battery"
                android:summary="@string/preference_show_battery_summary"
                android:defaultValue="true"
                />

            <CheckBoxPreference
                android:key="preference_show_time"
                android:title="@string/preference_show_time"
                android:summary="@string/preference_show_time_summary"
                android:defaultValue="true"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <CheckBoxPreference
                android:key="preference_show_camera_id"
                android:title="@string/preference_show_camera_id"
                android:summary="@string/preference_show_camera_id_summary"
                android:defaultValue="true"
                />

            <CheckBoxPreference
                android:key="preference_free_memory"
                android:title="@string/preference_free_memory"
                android:summary="@string/preference_free_memory_summary"
                android:defaultValue="true"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <CheckBoxPreference
                android:key="preference_show_iso"
                android:title="@string/preference_show_iso"
                android:summary="@string/preference_show_iso_summary"
                android:defaultValue="true"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference
                android:key="preference_histogram"
                android:title="@string/preference_histogram"
                android:summary="@string/preference_histogram_summary"
                android:entries="@array/preference_histogram_entries"
                android:entryValues="@array/preference_histogram_values"
                android:defaultValue="preference_histogram_off"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference
                android:key="preference_zebra_stripes"
                android:title="@string/preference_zebra_stripes"
                android:summary="@string/preference_zebra_stripes_summary"
                android:entries="@array/preference_zebra_stripes_entries"
                android:entryValues="@array/preference_zebra_stripes_values"
                android:defaultValue="0"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference
                android:key="preference_zebra_stripes_foreground_color"
                android:title="@string/preference_zebra_stripes_foreground_color"
                android:summary="@string/preference_zebra_stripes_foreground_color_summary"
                android:entries="@array/preference_zebra_stripes_foreground_color_entries"
                android:entryValues="@array/preference_zebra_stripes_foreground_color_values"
                android:defaultValue="#ff000000"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference
                android:key="preference_zebra_stripes_background_color"
                android:title="@string/preference_zebra_stripes_background_color"
                android:summary="@string/preference_zebra_stripes_background_color_summary"
                android:entries="@array/preference_zebra_stripes_background_color_entries"
                android:entryValues="@array/preference_zebra_stripes_background_color_values"
                android:defaultValue="#ffffffff"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference
                android:key="preference_focus_peaking"
                android:title="@string/preference_focus_peaking"
                android:summary="@string/preference_focus_peaking_summary"
                android:entries="@array/preference_focus_peaking_entries"
                android:entryValues="@array/preference_focus_peaking_values"
                android:defaultValue="preference_focus_peaking_off"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <!-- n.b., uses same entries/values as preference_angle_highlight_color -->
            <ListPreference
                android:key="preference_focus_peaking_color"
                android:title="@string/preference_focus_peaking_color"
                android:summary="@string/preference_focus_peaking_color_summary"
                android:entries="@array/preference_angle_highlight_color_entries"
                android:entryValues="@array/preference_angle_highlight_color_values"
                android:defaultValue="#ffffff"
                />

            <CheckBoxPreference
                android:key="preference_show_video_max_amp"
                android:title="@string/preference_show_video_max_amp"
                android:summary="@string/preference_show_video_max_amp_summary"
                android:defaultValue="false"
                />

            <ListPreference
                android:key="preference_grid"
                android:title="@string/preference_grid"
                android:summary="%s"
                android:entries="@array/preference_grid_entries"
                android:entryValues="@array/preference_grid_values"
                android:defaultValue="preference_grid_none"
                />

            <ListPreference
                android:key="preference_crop_guide"
                android:title="@string/preference_crop_guide"
                android:summary="@string/preference_crop_guide_summary"
                android:entries="@array/preference_crop_guide_entries"
                android:entryValues="@array/preference_crop_guide_values"
                android:defaultValue="crop_guide_none"
                />

            <CheckBoxPreference
                android:key="preference_thumbnail_animation"
                android:title="@string/preference_thumbnail_animation"
                android:summary="@string/preference_thumbnail_animation_summary"
                android:defaultValue="true"
                />

            <CheckBoxPreference
                android:key="preference_take_photo_border"
                android:title="@string/preference_take_photo_border"
                android:summary="@string/preference_take_photo_border_summary"
                android:defaultValue="true"
                />

            <ListPreference
                android:key="preference_rotate_preview"
                android:title="@string/preference_rotate_preview"
                android:summary="@string/preference_rotate_preview_summary"
                android:entries="@array/preference_rotate_preview_entries"
                android:entryValues="@array/preference_rotate_preview_values"
                android:defaultValue="0"
                />

        </PreferenceScreen>

        <PreferenceScreen
            android:key="preference_screen_gui"
            android:title="@string/preference_screen_gui"
            android:icon="@drawable/ic_more_horiz_white_48dp"
            android:persistent="false">

            <ListPreference
                android:key="preference_ui_placement"
                android:title="@string/preference_ui_placement"
                android:summary="%s"
                android:entries="@array/preference_ui_placement_entries"
                android:entryValues="@array/preference_ui_placement_values"
                android:defaultValue="ui_top"
                />
    
            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference 
                android:key="preference_immersive_mode"
                android:title="@string/preference_immersive_mode"
                android:summary="%s"
                android:entries="@array/preference_immersive_mode_entries"
                android:entryValues="@array/preference_immersive_mode_values"
                android:defaultValue="immersive_mode_low_profile"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <CheckBoxPreference
                android:key="preference_show_face_detection"
                android:title="@string/preference_show_face_detection"
                android:summary="@string/preference_show_face_detection_summary"
                android:icon="@drawable/ic_face_white_48dp"
                android:defaultValue="false"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <CheckBoxPreference
                android:key="preference_show_cycle_flash"
                android:title="@string/preference_show_cycle_flash"
                android:summary="@string/preference_show_cycle_flash_summary"
                android:icon="@drawable/flash_on"
                android:defaultValue="false"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <CheckBoxPreference
                android:key="preference_show_auto_level"
                android:title="@string/preference_show_auto_level"
                android:summary="@string/preference_show_auto_level_summary"
                android:icon="@drawable/auto_stabilise_icon"
                android:defaultValue="false"
                />

            <CheckBoxPreference
                android:key="preference_show_stamp"
                android:title="@string/preference_show_stamp"
                android:summary="@string/preference_show_stamp_summary"
                android:icon="@drawable/ic_text_format_white_48dp"
                android:defaultValue="false"
                />

            <CheckBoxPreference
                android:key="preference_show_textstamp"
                android:title="@string/preference_show_textstamp"
                android:summary="@string/preference_show_textstamp_summary"
                android:icon="@drawable/baseline_text_fields_white_48"
                android:defaultValue="false"
                />

            <CheckBoxPreference
                android:key="preference_show_store_location"
                android:title="@string/preference_show_store_location"
                android:summary="@string/preference_show_store_location_summary"
                android:icon="@drawable/ic_gps_fixed_white_48dp"
                android:defaultValue="false"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <CheckBoxPreference
                android:key="preference_show_cycle_raw"
                android:title="@string/preference_show_cycle_raw"
                android:summary="@string/preference_show_cycle_raw_summary"
                android:icon="@drawable/raw_icon"
                android:defaultValue="false"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <CheckBoxPreference
                android:key="preference_show_white_balance_lock"
                android:title="@string/preference_show_white_balance_lock"
                android:summary="@string/preference_show_white_balance_lock_summary"
                android:icon="@drawable/white_balance_unlocked"
                android:defaultValue="false"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <CheckBoxPreference
                android:key="preference_show_exposure_lock"
                android:title="@string/preference_show_exposure_lock"
                android:summary="@string/preference_show_exposure_lock_summary"
                android:icon="@drawable/exposure_unlocked"
                android:defaultValue="true"
                />

            <CheckBoxPreference
                android:key="preference_show_zoom_controls"
                android:title="@string/preference_show_zoom_controls"
                android:summary="@string/preference_show_zoom_controls_summary"
                android:defaultValue="false"
                />
        
            <CheckBoxPreference
                android:key="preference_show_zoom_slider_controls"
                android:title="@string/preference_show_zoom_slider_controls"
                android:summary="@string/preference_show_zoom_slider_controls_summary"
                android:defaultValue="true"
                />

            <CheckBoxPreference
                android:key="preference_show_take_photo"
                android:title="@string/preference_show_take_photo"
                android:summary="@string/preference_show_take_photo_summary"
                android:defaultValue="true"
                />

            <CheckBoxPreference
                android:key="preference_show_toasts"
                android:title="@string/preference_show_toasts"
                android:summary="@string/preference_show_toasts_summary"
                android:defaultValue="true"
                />

            <CheckBoxPreference
                android:key="preference_show_whats_new"
                android:title="@string/preference_show_whats_new"
                android:summary="@string/preference_show_whats_new_summary"
                android:defaultValue="true"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <SwitchPreference
                android:key="preference_multi_cam_button"
                android:title="@string/preference_multi_cam_button"
                android:summary="@string/preference_multi_cam_button_summary"
                android:defaultValue="true"
                />

            <SwitchPreference
                android:key="preference_keep_display_on"
                android:title="@string/preference_keep_display_on"
                android:summary="@string/preference_keep_display_on_summary"
                android:defaultValue="true"
                />

            <SwitchPreference
                android:key="preference_max_brightness"
                android:title="@string/preference_max_brightness"
                android:summary="@string/preference_max_brightness_summary"
                android:defaultValue="true"
                />

        </PreferenceScreen>

    </PreferenceCategory>

    <PreferenceCategory
        android:key="preference_category_camera_quality"
        android:title="@string/preference_category_camera_quality">

        <PreferenceScreen
            android:key="preference_screen_photo_settings"
            android:title="@string/preference_screen_photo_settings"
            android:icon="@drawable/take_photo_pref"
            android:persistent="false">
    
            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference 
                android:key="preference_resolution"
                android:title="@string/preference_resolution"
                android:summary="%s"
                android:icon="@drawable/ic_photo_size_select_large_white_48dp"
                />

            <net.sourceforge.opencamera.ui.ArraySeekBarPreference
                android:key="preference_quality"
                android:title="@string/preference_quality"
                android:summary="@string/preference_quality_summary"
                android:defaultValue="90"
                />

            <ListPreference
                android:key="preference_image_format"
                android:title="@string/preference_image_format"
                android:summary="@string/preference_image_format_summary"
                android:entries="@array/preference_image_format_entries"
                android:entryValues="@array/preference_image_format_values"
                android:defaultValue="preference_image_format_jpeg"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference 
                android:key="preference_raw"
                android:title="@string/preference_raw"
                android:summary="%s"
                android:entries="@array/preference_raw_entries"
                android:entryValues="@array/preference_raw_values"
                android:defaultValue="preference_raw_no"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <SwitchPreference
                android:key="preference_raw_expo_bracketing"
                android:title="@string/preference_raw_expo_bracketing"
                android:summary="@string/preference_raw_expo_bracketing_summary"
                android:defaultValue="true"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <SwitchPreference
                android:key="preference_raw_focus_bracketing"
                android:title="@string/preference_raw_focus_bracketing"
                android:summary="@string/preference_raw_focus_bracketing_summary"
                android:defaultValue="true"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference
                android:key="preference_nr_save"
                android:title="@string/preference_nr_save"
                android:summary="@string/preference_nr_save_summary"
                android:entries="@array/preference_nr_save_entries"
                android:entryValues="@array/preference_nr_save_values"
                android:defaultValue="preference_nr_save_no"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <SwitchPreference
                android:key="preference_hdr_save_expo"
                android:title="@string/preference_hdr_save_expo"
                android:summary="@string/preference_hdr_save_expo_summary"
                android:defaultValue="false"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference
                android:key="preference_hdr_contrast_enhancement"
                android:title="@string/preference_hdr_contrast_enhancement"
                android:summary="@string/preference_hdr_contrast_enhancement_summary"
                android:entries="@array/preference_hdr_contrast_enhancement_entries"
                android:entryValues="@array/preference_hdr_contrast_enhancement_values"
                android:defaultValue="preference_hdr_contrast_enhancement_smart"
                />


            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference
                android:key="preference_expo_bracketing_n_images"
                android:title="@string/preference_expo_bracketing_n_images"
                android:summary="@string/preference_expo_bracketing_n_images_summary"
                android:entries="@array/preference_expo_bracketing_n_images_entries"
                android:entryValues="@array/preference_expo_bracketing_n_images_values"
                android:defaultValue="3"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference
                android:key="preference_expo_bracketing_stops"
                android:title="@string/preference_expo_bracketing_stops"
                android:summary="@string/preference_expo_bracketing_stops_summary"
                android:entries="@array/preference_expo_bracketing_stops_entries"
                android:entryValues="@array/preference_expo_bracketing_stops_values"
                android:defaultValue="2"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference
                android:key="preference_panorama_crop"
                android:title="@string/preference_panorama_crop"
                android:summary="@string/preference_panorama_crop_summary"
                android:entries="@array/preference_panorama_crop_entries"
                android:entryValues="@array/preference_panorama_crop_values"
                android:defaultValue="preference_panorama_crop_on"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <ListPreference
                android:key="preference_panorama_save"
                android:title="@string/preference_panorama_save"
                android:summary="@string/preference_panorama_save_summary"
                android:entries="@array/preference_panorama_save_entries"
                android:entryValues="@array/preference_panorama_save_values"
                android:defaultValue="preference_panorama_save_no"
                />

            <ListPreference
                android:key="preference_front_camera_mirror"
                android:title="@string/preference_front_camera_mirror"
                android:summary="@string/preference_front_camera_mirror_summary"
                android:entries="@array/preference_front_camera_mirror_entries"
                android:entryValues="@array/preference_front_camera_mirror_values"
                android:defaultValue="preference_front_camera_mirror_no"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <PreferenceCategory
                android:key="preference_category_exif_tags"
                android:title="@string/preference_category_exif_tags"
                >

                <!--suppress AndroidDomInspection --> <!-- stop lint complaining about empty defaultValue -->
                <EditTextPreference
                    android:key="preference_exif_artist"
                    android:title="@string/preference_exif_artist"
                    android:summary="@string/preference_exif_artist_summary"
                    android:dialogTitle="@string/preference_exif_artist"
                    android:dialogMessage="@string/preference_exif_artist_summary"
                    android:inputType="text"
                    android:defaultValue=""
                    />

                <!--suppress AndroidDomInspection --> <!-- stop lint complaining about empty defaultValue -->
                <EditTextPreference
                    android:key="preference_exif_copyright"
                    android:title="@string/preference_exif_copyright"
                    android:summary="@string/preference_exif_copyright_summary"
                    android:dialogTitle="@string/preference_exif_copyright"
                    android:dialogMessage="@string/preference_exif_copyright_summary"
                    android:inputType="text"
                    android:defaultValue=""
                    />

            </PreferenceCategory>

            <PreferenceCategory
                android:key="preference_category_stamp"
                android:title="@string/preference_category_stamp"
                >
        
                <ListPreference 
                    android:key="preference_stamp"
                    android:title="@string/preference_stamp"
                    android:icon="@drawable/ic_text_format_white_48dp"
                    android:summary="@string/preference_stamp_summary"
                    android:entries="@array/preference_stamp_entries"
                    android:entryValues="@array/preference_stamp_values"
                    android:defaultValue="preference_stamp_no"
                    />
    
                <ListPreference 
                    android:key="preference_stamp_dateformat"
                    android:title="@string/preference_stamp_dateformat"
                    android:summary="%s"
                    android:entries="@array/preference_stamp_dateformat_entries"
                    android:entryValues="@array/preference_stamp_dateformat_values"
                    android:defaultValue="preference_stamp_dateformat_default"
                    />
    
                <ListPreference 
                    android:key="preference_stamp_timeformat"
                    android:title="@string/preference_stamp_timeformat"
                    android:summary="%s"
                    android:entries="@array/preference_stamp_timeformat_entries"
                    android:entryValues="@array/preference_stamp_timeformat_values"
                    android:defaultValue="preference_stamp_timeformat_default"
                    />
    
                <ListPreference 
                    android:key="preference_stamp_gpsformat"
                    android:title="@string/preference_stamp_gpsformat"
                    android:summary="%s"
                    android:entries="@array/preference_stamp_gpsformat_entries"
                    android:entryValues="@array/preference_stamp_gpsformat_values"
                    android:defaultValue="preference_stamp_gpsformat_default"
                    />

                <ListPreference
                    android:key="preference_stamp_geo_address"
                    android:title="@string/preference_stamp_geo_address"
                    android:summary="@string/preference_stamp_geo_address_summary"
                    android:entries="@array/preference_stamp_geo_address_entries"
                    android:entryValues="@array/preference_stamp_geo_address_values"
                    android:defaultValue="preference_stamp_geo_address_no"
                    />

                <ListPreference
                    android:key="preference_units_distance"
                    android:title="@string/preference_units_distance"
                    android:summary="@string/preference_units_distance_summary"
                    android:entries="@array/preference_units_distance_entries"
                    android:entryValues="@array/preference_units_distance_values"
                    android:defaultValue="preference_units_distance_m"
                    />

                <!--suppress AndroidDomInspection --> <!-- stop lint complaining about empty defaultValue -->
                <EditTextPreference
                    android:key="preference_textstamp"
                    android:title="@string/preference_textstamp"
                    android:summary="@string/preference_textstamp_summary"
                    android:dialogTitle="@string/preference_textstamp"
                    android:dialogMessage="@string/preference_textstamp_summary"
                    android:inputType="text"
                    android:defaultValue=""
                    />

                <net.sourceforge.opencamera.ui.ArraySeekBarPreference
                    android:key="preference_stamp_fontsize"
                    android:title="@string/preference_stamp_fontsize"
                    android:summary="@string/preference_stamp_fontsize_summary"
                    android:entries="@array/preference_stamp_fontsize_entries"
                    android:entryValues="@array/preference_stamp_fontsize_values"
                    android:defaultValue="12"
                    />
    
                <ListPreference 
                    android:key="preference_stamp_font_color"
                    android:title="@string/preference_stamp_font_color"
                    android:summary="@string/preference_stamp_font_color_summary"
                    android:entries="@array/preference_angle_highlight_color_entries"
                    android:entryValues="@array/preference_angle_highlight_color_values"
                    android:defaultValue="#ffffff"
                    />
    
                <ListPreference 
                    android:key="preference_stamp_style"
                    android:title="@string/preference_stamp_style"
                    android:summary="@string/preference_stamp_style_summary"
                    android:entries="@array/preference_stamp_style_entries"
                    android:entryValues="@array/preference_stamp_style_values"
                    android:defaultValue="preference_stamp_style_shadowed"
                    />

            </PreferenceCategory>

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <PreferenceCategory
                android:key="preference_category_photo_debugging"
                android:title="@string/preference_category_photo_debugging"
                >

                <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
                <SwitchPreference
                    android:key="preference_camera2_fake_flash"
                    android:title="@string/preference_camera2_fake_flash"
                    android:summary="@string/preference_camera2_fake_flash_summary"
                    android:defaultValue="false"
                    />

                <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
                <SwitchPreference
                    android:key="preference_camera2_fast_burst"
                    android:title="@string/preference_camera2_fast_burst"
                    android:summary="@string/preference_camera2_fast_burst_summary"
                    android:defaultValue="true"
                    />

                <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
                <SwitchPreference
                    android:key="preference_camera2_photo_video_recording"
                    android:title="@string/preference_camera2_photo_video_recording"
                    android:summary="@string/preference_camera2_photo_video_recording_summary"
                    android:defaultValue="true"
                    />

                <!--
                <SwitchPreference
                    android:key="preference_background_photo_saving"
                    android:title="@string/preference_background_photo_saving"
                    android:summary="@string/preference_background_photo_saving_summary"
                    android:defaultValue="true"
                    />
                -->

            </PreferenceCategory>

        </PreferenceScreen>

        <PreferenceScreen
            android:key="preference_screen_video_settings"
            android:title="@string/preference_screen_video_settings"
            android:icon="@drawable/take_video_pref"
            android:persistent="false">

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <!-- title set programmatically -->
            <ListPreference
                android:key="preference_video_quality"
                android:summary="%s"
                />

            <!--  if we move this to another PreferenceGroup, we should update code for the findPreference() call -->
            <SwitchPreference
                android:key="preference_video_stabilization"
                android:title="@string/preference_video_stabilization"
                android:summary="@string/preference_video_stabilization_summary"
                android:defaultValue="false"
                />

            <ListPreference
                android:key="preference_video_output_format"
                android:title="@string/preference_video_output_format"
                android:summary="@string/preference_video_output_format_summary"
                android:entries="@array/preference_video_output_format_entries"
                android:entryValues="@array/preference_video_output_format_values"
                android:defaultValue="preference_video_output_format_default"
                />

            <!--  if we move this to another PreferenceGroup, we should update code for the findPreference() call -->
            <ListPreference
                android:key="preference_video_log"
                android:title="@string/preference_video_log"
                android:summary="@string/preference_video_log_summary"
                android:entries="@array/preference_video_log_entries"
                android:entryValues="@array/preference_video_log_values"
                android:defaultValue="off"
                />

            <!--  if we move this to another PreferenceGroup, we should update code for the findPreference() call -->
            <net.sourceforge.opencamera.ui.ArraySeekBarPreference
                android:key="preference_video_profile_gamma"
                android:title="@string/preference_video_profile_gamma"
                android:summary="@string/preference_video_profile_gamma_summary"
                android:entries="@array/preference_video_profile_gamma_entries"
                android:entryValues="@array/preference_video_profile_gamma_values"
                android:defaultValue="2.2"
                />

            <ListPreference
                android:key="preference_video_max_duration"
                android:title="@string/preference_video_max_duration"
                android:summary="@string/preference_video_max_duration_summary"
                android:entries="@array/preference_video_max_duration_entries"
                android:entryValues="@array/preference_video_max_duration_values"
                android:defaultValue="0"
                />

            <ListPreference 
                android:key="preference_video_restart"
                android:title="@string/preference_video_restart"
                android:summary="@string/preference_video_restart_summary"
                android:entries="@array/preference_video_restart_entries"
                android:entryValues="@array/preference_video_restart_values"
                android:defaultValue="0"
                />

            <ListPreference 
                android:key="preference_video_max_filesize"
                android:title="@string/preference_video_max_filesize"
                android:summary="@string/preference_video_max_filesize_summary"
                android:entries="@array/preference_video_max_filesize_entries"
                android:entryValues="@array/preference_video_max_filesize_values"
                android:defaultValue="0"
                />

            <SwitchPreference
                android:key="preference_video_restart_max_filesize"
                android:title="@string/preference_video_restart_max_filesize"
                android:summary="@string/preference_video_restart_max_filesize_summary"
                android:defaultValue="true"
                />

            <SwitchPreference
                android:key="preference_record_audio"
                android:title="@string/preference_record_audio"
                android:summary="@string/preference_record_audio_summary"
                android:defaultValue="true"
                />

            <ListPreference 
                android:key="preference_record_audio_src"
                android:title="@string/preference_record_audio_src"
                android:summary="@string/preference_record_audio_src_summary"
                android:entries="@array/preference_record_audio_src_entries"
                android:entryValues="@array/preference_record_audio_src_values"
                android:defaultValue="audio_src_camcorder"
                android:dependency="preference_record_audio"
                />

            <ListPreference 
                android:key="preference_record_audio_channels"
                android:title="@string/preference_record_audio_channels"
                android:summary="@string/preference_record_audio_channels_summary"
                android:entries="@array/preference_record_audio_channels_entries"
                android:entryValues="@array/preference_record_audio_channels_values"
                android:defaultValue="audio_default"
                android:dependency="preference_record_audio"
                />

            <SwitchPreference
                android:key="preference_lock_video"
                android:title="@string/preference_lock_video"
                android:summary="@string/preference_lock_video_summary"
                android:defaultValue="false"
                />

            <ListPreference
                android:key="preference_video_subtitle"
                android:title="@string/preference_video_subtitle"
                android:summary="@string/preference_video_subtitle_summary"
                android:entries="@array/preference_video_subtitle_entries"
                android:entryValues="@array/preference_video_subtitle_values"
                android:defaultValue="preference_video_subtitle_no"
                />

            <PreferenceCategory
                android:key="preference_category_video_debugging"
                android:title="@string/preference_category_video_debugging"
                >

                <ListPreference
                    android:key="preference_video_bitrate"
                    android:title="@string/preference_video_bitrate"
                    android:summary="@string/preference_video_bitrate_summary"
                    android:entries="@array/preference_video_bitrate_entries"
                    android:entryValues="@array/preference_video_bitrate_values"
                    android:defaultValue="default"
                    />

                <ListPreference
                    android:key="preference_video_fps"
                    android:title="@string/preference_video_fps"
                    android:summary="@string/preference_video_fps_summary"
                    android:defaultValue="default"
                    />

                <!--  if we move this to another PreferenceGroup, we should update code for the findPreference() call -->
                <SwitchPreference
                    android:key="preference_force_video_4k"
                    android:title="@string/preference_force_video_4k"
                    android:summary="@string/preference_force_video_4k_summary"
                    android:defaultValue="false"
                    />

                <SwitchPreference
                    android:key="preference_video_low_power_check"
                    android:title="@string/preference_video_low_power_check"
                    android:summary="@string/preference_video_low_power_check_summary"
                    android:defaultValue="true"
                    />

                <SwitchPreference
                    android:key="preference_video_flash"
                    android:title="@string/preference_video_flash"
                    android:summary="@string/preference_video_flash_summary"
                    android:defaultValue="false"
                    />

            </PreferenceCategory>

        </PreferenceScreen>

        <PreferenceScreen
            android:key="preference_screen_location_settings"
            android:title="@string/preference_screen_location_settings"
            android:icon="@drawable/ic_gps_fixed_white_48dp"
            android:persistent="false">

            <CheckBoxPreference
                android:key="preference_location"
                android:title="@string/preference_location"
                android:summary="@string/preference_location_summary"
                android:icon="@drawable/ic_gps_fixed_white_48dp"
                android:defaultValue="false"
                />
            
            <CheckBoxPreference
                android:key="preference_gps_direction"
                android:title="@string/preference_gps_direction"
                android:summary="@string/preference_gps_direction_summary"
                android:defaultValue="false"
                />

            <!--  if we move this to another PreferenceGroup, we should update code to remove this Preference -->
            <CheckBoxPreference
                android:key="preference_comment_ypr"
                android:title="@string/preference_comment_ypr"
                android:summary="@string/preference_comment_ypr_summary"
                android:defaultValue="false"
                />

            <CheckBoxPreference
                android:key="preference_require_location"
                android:title="@string/preference_require_location"
                android:summary="@string/preference_require_location_summary"
                android:defaultValue="false"
                android:dependency="preference_location"
                />

        </PreferenceScreen>

        <PreferenceScreen
            android:key="preference_screen_processing_settings"
            android:title="@string/preference_screen_processing_settings"
            android:icon="@drawable/ic_more_horiz_white_48dp"
            android:persistent="false">

            <!--  if we move this to another PreferenceGroup, we should update code for the findPreference() call -->
            <!--  if we move this to another PreferenceGroup, we should update code for the readFromIntent() call -->
            <ListPreference
                android:key="preference_antibanding"
                android:title="@string/preference_antibanding"
                android:summary="@string/preference_antibanding_summary"
                />

            <!--  if we move this to another PreferenceGroup, we should update code for the findPreference() call -->
            <!--  if we move this to another PreferenceGroup, we should update code for the readFromIntent() call -->
            <ListPreference
                android:key="preference_edge_mode"
                android:title="@string/preference_edge_mode"
                android:summary="@string/preference_edge_mode_summary"
                />

            <!--  if we move this to another PreferenceGroup, we should update code for the findPreference() call -->
            <!--  if we move this to another PreferenceGroup, we should update code for the readFromIntent() call -->
            <ListPreference
                android:key="preference_noise_reduction_mode"
                android:title="@string/preference_noise_reduction_mode"
                android:summary="@string/preference_noise_reduction_mode_summary"
                />

        </PreferenceScreen>

    </PreferenceCategory>

    <PreferenceCategory
        android:key="preference_category_online"
        android:title="@string/preference_category_online"
        >

        <Preference
            android:key="preference_online_help"  
            android:title="@string/preference_online_help"
            android:summary="@string/preference_online_help_summary"
            android:icon="@drawable/ic_help_outline_white_48dp"
            />  

        <!--  if we move this to another PreferenceGroup, we should update code for the findPreference() call -->
        <ListPreference
            android:key="preference_camera_api"
            android:title="@string/preference_camera_api"
            android:summary="@string/preference_camera_api_summary"
            />

        <Preference
            android:key="preference_about"  
            android:title="@string/preference_about"
            android:summary="@string/preference_about_summary"
            android:icon="@drawable/ic_info_outline_white_48dp"
            />

        <Preference
            android:key="preference_privacy_policy"
            android:title="@string/preference_privacy_policy"
            android:summary="@string/preference_privacy_policy_summary"
            android:icon="@drawable/ic_info_outline_white_48dp"
            />

        <PreferenceScreen
            android:key="preference_screen_licences"
            android:title="@string/preference_screen_licences"
            android:icon="@drawable/ic_info_outline_white_48dp"
            android:persistent="false">

            <Preference
                android:key="preference_licence_open_camera"
                android:title="@string/preference_licence_open_camera"
                android:summary="@string/preference_licence_open_camera_text"
                />

            <Preference
                android:key="preference_licence_androidx"
                android:title="@string/preference_licence_androidx"
                android:summary="@string/preference_licence_androidx_text"
                />

            <Preference
                android:key="preference_licence_google_icons"
                android:title="@string/preference_licence_google_icons"
                android:summary="@string/preference_licence_google_icons_text"
                />

            <Preference
                android:key="preference_licence_online"
                android:title="@string/preference_licence_online"
                android:summary="@string/preference_licence_online_text"
                />

        </PreferenceScreen>

        <PreferenceScreen
            android:key="preference_screen_settings_manager"
            android:title="@string/preference_screen_settings_manager"
            android:icon="@drawable/settings"
            android:persistent="false">

            <Preference
                android:key="preference_save_settings"
                android:title="@string/preference_save_settings"
                android:summary="@string/preference_save_settings_summary"
                android:icon="@drawable/ic_save_white_48dp"
                />

            <Preference
                android:key="preference_restore_settings"
                android:title="@string/preference_restore_settings"
                android:summary="@string/preference_restore_settings_summary"
                android:icon="@drawable/baseline_folder_open_white_48"
                />

            <Preference
                android:key="preference_reset"
                android:title="@string/preference_reset"
                android:summary="@string/preference_reset_summary"
                android:icon="@drawable/ic_power_settings_new_white_48dp"
                />

        </PreferenceScreen>

        </PreferenceCategory>
        
</PreferenceScreen>
