<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">

    <SwitchPreferenceCompat
        app:key="sync"
        app:title="@string/sync_title" />

    <SwitchPreferenceCompat
        app:dependency="sync"
        app:key="attachment"
        app:summaryOff="@string/attachment_summary_off"
        app:summaryOn="@string/attachment_summary_on"
        app:title="@string/attachment_title" />

</PreferenceScreen>