Change color, refresh charts

This commit is contained in:
vanous 2019-09-08 22:05:10 +02:00 committed by Andreas Shimokawa
parent 132e92041e
commit b3d1068870
3 changed files with 10 additions and 8 deletions

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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" />
</menu>