From 132e92041ec520e03e67ff7d2b88a63f6c667b85 Mon Sep 17 00:00:00 2001 From: vanous Date: Sun, 8 Sep 2019 16:11:18 +0200 Subject: [PATCH] Split preferences, add chart settings activity, add button --- app/src/main/AndroidManifest.xml | 4 ++ .../activities/SettingsActivity.java | 11 ++++++ .../activities/charts/ChartsActivity.java | 4 ++ .../charts/ChartsPreferencesActivity.java | 38 ++++++++++++++++++ app/src/main/res/menu/menu_charts.xml | 6 ++- app/src/main/res/xml/charts_preferences.xml | 39 +++++++++++++++++++ app/src/main/res/xml/preferences.xml | 37 +----------------- 7 files changed, 103 insertions(+), 36 deletions(-) create mode 100644 app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ChartsPreferencesActivity.java create mode 100644 app/src/main/res/xml/charts_preferences.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index dadfcfa39..8aecd746f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -60,6 +60,10 @@ android:name=".activities.SettingsActivity" android:label="@string/title_activity_settings" android:parentActivityName=".activities.ControlCenterv2" /> + . */ +package nodomain.freeyourgadget.gadgetbridge.activities.charts; + +import android.os.Bundle; + +import nodomain.freeyourgadget.gadgetbridge.GBApplication; +import nodomain.freeyourgadget.gadgetbridge.R; +import nodomain.freeyourgadget.gadgetbridge.activities.AbstractSettingsActivity; + +import nodomain.freeyourgadget.gadgetbridge.util.Prefs; + + +public class ChartsPreferencesActivity extends AbstractSettingsActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + addPreferencesFromResource(R.xml.charts_preferences); + + + } +} diff --git a/app/src/main/res/menu/menu_charts.xml b/app/src/main/res/menu/menu_charts.xml index bc833ddc3..0a46a8749 100644 --- a/app/src/main/res/menu/menu_charts.xml +++ b/app/src/main/res/menu/menu_charts.xml @@ -7,5 +7,9 @@ app:showAsAction="ifRoom" android:icon="@android:drawable/stat_notify_sync_noanim" android:title="@string/controlcenter_fetch_activity_data"/> - + diff --git a/app/src/main/res/xml/charts_preferences.xml b/app/src/main/res/xml/charts_preferences.xml new file mode 100644 index 000000000..95d7453d0 --- /dev/null +++ b/app/src/main/res/xml/charts_preferences.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 7eb6e91b9..efec8ad83 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -158,42 +158,9 @@ android:title="@string/activity_prefs_activetime_minutes" /> - - - - - - - - - - + android:title="@string/activity_prefs_charts"/>