mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 17:48:52 -06:00
Implement settings screen
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<resources>
|
||||
|
||||
<style name="AppBaseTheme" parent="android:Theme.Material">
|
||||
<style name="AppBaseTheme" parent="android:Theme.Material.Light.DarkActionBar">
|
||||
<item name="android:textColor">#606060</item>
|
||||
<item name="android:colorPrimary">@color/primary</item>
|
||||
<item name="android:colorPrimaryDark">@color/primary_darker</item>
|
||||
@@ -9,10 +9,6 @@
|
||||
<item name="android:windowContentTransitions">true</item>
|
||||
<item name="android:windowAllowEnterTransitionOverlap">true</item>
|
||||
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
||||
<item name="android:actionBarPopupTheme">@style/actionBarStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="actionBarStyle" parent="android:ThemeOverlay.Material.Light">
|
||||
</style>
|
||||
|
||||
<style name="MyDialogStyle" parent="android:Theme.Material.Light.Dialog">
|
||||
|
||||
@@ -9,5 +9,4 @@
|
||||
<style name="habitsListCheckStyle" parent="habitsListCheckBasicStyle">
|
||||
<item name="android:background">@drawable/ripple_background</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -3,4 +3,24 @@
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="small_square_size">20dp</dimen>
|
||||
<dimen name="check_square_size">42dp</dimen>
|
||||
|
||||
<string-array name="snooze_interval_names">
|
||||
<item>15 minutes</item>
|
||||
<item>30 minutes</item>
|
||||
<item>1 hour</item>
|
||||
<item>2 hours</item>
|
||||
<item>4 hours</item>
|
||||
<item>8 hours</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="snooze_interval_values">
|
||||
<item>15</item>
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
<item>120</item>
|
||||
<item>240</item>
|
||||
<item>480</item>
|
||||
</string-array>
|
||||
|
||||
<string name="snooze_interval_default">15 minutes</string>
|
||||
</resources>
|
||||
49
app/src/main/res/xml/preferences.xml
Normal file
49
app/src/main/res/xml/preferences.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="pref_key_behaviour_settings"
|
||||
android:title="Behavior">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="pref_short_toggle"
|
||||
android:summary="More convenient, but might cause accidental toggles."
|
||||
android:title="Toggle repetitions with short press"/>
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="@string/snooze_interval_default"
|
||||
android:dialogTitle="Snooze interval"
|
||||
android:entries="@array/snooze_interval_names"
|
||||
android:entryValues="@array/snooze_interval_values"
|
||||
android:key="pref_snooze_interval"
|
||||
android:title="Snooze interval on reminders"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="pref_key_links"
|
||||
android:title="Links">
|
||||
|
||||
<Preference android:title="Rate this app in Google Play">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="market://details?id=org.isoron.uhabits"/>
|
||||
</Preference>
|
||||
|
||||
<Preference android:title="Send feedback to developer">
|
||||
<intent
|
||||
android:action="android.intent.action.SENDTO"
|
||||
android:data="mailto:isoron@gmail.com?subject=Feedback%20for%20Habits%20Tracker"/>
|
||||
</Preference>
|
||||
|
||||
<Preference android:title="View source code at GitHub">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="https://github.com/iSoron/uhabits"/>
|
||||
</Preference>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user