diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ChartsActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ChartsActivity.java index 2866642ff..2c2e98531 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ChartsActivity.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ChartsActivity.java @@ -255,6 +255,14 @@ public class ChartsActivity extends AbstractGBFragmentActivity implements Charts return true; } + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + if (requestCode == 1) { + this.recreate(); + } + } + @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { @@ -263,7 +271,7 @@ public class ChartsActivity extends AbstractGBFragmentActivity implements Charts return true; case R.id.prefs_charts_menu: Intent settingsIntent = new Intent(this, ChartsPreferencesActivity.class); - startActivity(settingsIntent); + startActivityForResult(settingsIntent,1); return true; default: break; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ChartsPreferencesActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ChartsPreferencesActivity.java index 6204e88c9..b3cfc7505 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ChartsPreferencesActivity.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ChartsPreferencesActivity.java @@ -19,20 +19,13 @@ 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 0a46a8749..3f1bd1eff 100644 --- a/app/src/main/res/menu/menu_charts.xml +++ b/app/src/main/res/menu/menu_charts.xml @@ -11,5 +11,6 @@ android:id="@+id/prefs_charts_menu" android:icon="@drawable/ic_settings" android:title="@string/pref_header_charts" + app:iconTint="@color/primarytext_dark" app:showAsAction="ifRoom" />