Add sync preferences to settings screen

This commit is contained in:
2020-11-22 15:39:08 -06:00
parent a2400172e2
commit 23f2978a64
9 changed files with 101 additions and 121 deletions

View File

@@ -116,21 +116,24 @@
<CheckBoxPreference
android:defaultValue="false"
android:key="pref_enable_device_sync"
android:key="pref_sync_enabled"
android:summary="@string/pref_sync_summary"
android:title="@string/pref_sync_title"
app:iconSpaceReserved="false" />
<Preference
android:key="viewSync"
android:key="pref_sync_display"
android:title="@string/display_sync_code"
app:iconSpaceReserved="false"
/>
app:iconSpaceReserved="false">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="org.isoron.uhabits.activities.sync.SyncActivity"
android:targetPackage="org.isoron.uhabits" />
</Preference>
</PreferenceCategory>
<PreferenceCategory
android:key="databaseCategory"
android:title="@string/database">
@@ -218,6 +221,20 @@
android:title="Enable widget stacks"
app:iconSpaceReserved="false" />
<EditTextPreference
android:defaultValue="@string/syncBaseURL"
android:key="pref_sync_base_url"
android:title="Sync server"
app:iconSpaceReserved="false"
/>
<EditTextPreference
android:defaultValue=""
android:key="pref_sync_key"
android:title="Sync key"
app:iconSpaceReserved="false"
/>
</PreferenceCategory>
</PreferenceScreen>