mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-11 17:41:57 +01:00
Change color, refresh charts
This commit is contained in:
parent
132e92041e
commit
b3d1068870
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user