diff --git a/app/build.gradle b/app/build.gradle index c6faae4..c8e6bb9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -51,6 +51,7 @@ dependencies { // Database library implementation "com.influxdb:influxdb-client-kotlin:6.3.0" + implementation 'androidx.preference:preference:1.2.0' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index fb912c6..31ef29f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -18,6 +18,10 @@ android:supportsRtl="true" android:theme="@style/Theme.WearSync" tools:targetApi="31"> + diff --git a/app/src/main/java/org/hydev/wearsync/ActivitySettings.kt b/app/src/main/java/org/hydev/wearsync/ActivitySettings.kt new file mode 100644 index 0000000..e7b1e46 --- /dev/null +++ b/app/src/main/java/org/hydev/wearsync/ActivitySettings.kt @@ -0,0 +1,31 @@ +package org.hydev.wearsync + +import android.os.Bundle +import androidx.appcompat.app.AppCompatActivity +import androidx.preference.PreferenceFragmentCompat + +class ActivitySettings : AppCompatActivity() +{ + + override fun onCreate(savedInstanceState: Bundle?) + { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_settings) + if (savedInstanceState == null) + { + supportFragmentManager + .beginTransaction() + .replace(R.id.settings, SettingsFragment()) + .commit() + } + supportActionBar?.setDisplayHomeAsUpEnabled(true) + } + + class SettingsFragment : PreferenceFragmentCompat() + { + override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) + { + setPreferencesFromResource(R.xml.root_preferences, rootKey) + } + } +} \ No newline at end of file diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml new file mode 100644 index 0000000..de6591a --- /dev/null +++ b/app/src/main/res/layout/activity_settings.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml new file mode 100644 index 0000000..6cf9ed4 --- /dev/null +++ b/app/src/main/res/values/arrays.xml @@ -0,0 +1,12 @@ + + + + Reply + Reply to all + + + + reply + reply_all + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b06d083..d92a4fe 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -2,4 +2,20 @@ WearSync Settings Scan for Devices + + + Messages + Sync + + + Your signature + Default reply action + + + Sync email periodically + Download incoming attachments + Automatically download attachments for incoming emails + + Only download attachments when manually requested + ActivitySettings \ No newline at end of file diff --git a/app/src/main/res/xml/root_preferences.xml b/app/src/main/res/xml/root_preferences.xml new file mode 100644 index 0000000..67158db --- /dev/null +++ b/app/src/main/res/xml/root_preferences.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file