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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
if (requestCode == 1) {
|
||||||
|
this.recreate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
@ -263,7 +271,7 @@ public class ChartsActivity extends AbstractGBFragmentActivity implements Charts
|
|||||||
return true;
|
return true;
|
||||||
case R.id.prefs_charts_menu:
|
case R.id.prefs_charts_menu:
|
||||||
Intent settingsIntent = new Intent(this, ChartsPreferencesActivity.class);
|
Intent settingsIntent = new Intent(this, ChartsPreferencesActivity.class);
|
||||||
startActivity(settingsIntent);
|
startActivityForResult(settingsIntent,1);
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -19,20 +19,13 @@ package nodomain.freeyourgadget.gadgetbridge.activities.charts;
|
|||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.AbstractSettingsActivity;
|
import nodomain.freeyourgadget.gadgetbridge.activities.AbstractSettingsActivity;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
|
||||||
|
|
||||||
|
|
||||||
public class ChartsPreferencesActivity extends AbstractSettingsActivity {
|
public class ChartsPreferencesActivity extends AbstractSettingsActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
addPreferencesFromResource(R.xml.charts_preferences);
|
addPreferencesFromResource(R.xml.charts_preferences);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,5 +11,6 @@
|
|||||||
android:id="@+id/prefs_charts_menu"
|
android:id="@+id/prefs_charts_menu"
|
||||||
android:icon="@drawable/ic_settings"
|
android:icon="@drawable/ic_settings"
|
||||||
android:title="@string/pref_header_charts"
|
android:title="@string/pref_header_charts"
|
||||||
|
app:iconTint="@color/primarytext_dark"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
</menu>
|
</menu>
|
||||||
|
Loading…
Reference in New Issue
Block a user