1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 02:25:50 +01:00

Misc improvelets (#45)

This commit is contained in:
cpfeiffer 2015-07-21 21:24:35 +02:00
parent c9ab10e7e8
commit 1f2b0329c5
5 changed files with 10 additions and 4 deletions

View File

@ -76,7 +76,6 @@ public class ChartsActivity extends FragmentActivity {
boolean wasBusy = mProgressBar.getVisibility() != View.GONE;
if (wasBusy) {
mProgressBar.setVisibility(View.GONE);
// TODO: refresh current fragment
LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent(AbstractChartFragment.ACTION_REFRESH));
}
}

View File

@ -104,7 +104,8 @@ public class SleepChartFragment extends AbstractChartFragment {
data.setDataSet(set);
pieChart.setData(data);
setupLegend(pieChart);
pieChart.getLegend().setEnabled(false);
//setupLegend(pieChart);
pieChart.invalidate();
}

View File

@ -21,6 +21,10 @@ public class CustomLegendRenderer extends LegendRenderer {
@Override
public void computeLegend(ChartData<?> data) {
if (!mLegend.isEnabled()) {
return;
}
// don't call super to avoid computing colors and labels
// super.computeLegend(data);

View File

@ -7,6 +7,8 @@
<item
android:id="@+id/charts_fetch_activity_data"
app:showAsAction="ifRoom"
android:icon="@android:drawable/stat_notify_sync_noanim"
android:title="@string/controlcenter_fetch_activity_data"/>
</menu>

View File

@ -6,7 +6,7 @@
<string name="action_settings">Settings</string>
<string name="action_debug">Debug</string>
<string name="action_quit">Quit</string>
<string name="controlcenter_fetch_activity_data">Fetch Activity Data</string>
<string name="controlcenter_fetch_activity_data">Synchronize</string>
<string name="controlcenter_start_sleepmonitor">Sleep Monitor (ALPHA)</string>
<string name="controlcenter_find_device">Find Device…</string>
<string name="controlcenter_take_screenshot">Take Screenshot</string>
@ -137,7 +137,7 @@
<string name="pref_screen_notification_profile_incoming_call">Incoming Call Notification</string>
<string name="control_center_find_lost_device">Find lost Device</string>
<string name="control_center_cancel_to_stop_vibration">Cancel to stop vibration.</string>
<string name="title_activity_charts">ChartsActivity</string>
<string name="title_activity_charts">Your Activity</string>
<string name="title_activity_set_alarm">Configure Alarms</string>
<string name="controlcenter_start_configure_alarms">Configure alarms</string>
<string name="title_activity_alarm_details">Alarm Details</string>