mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 02:25:50 +01:00
Slightly better text when no data available
This commit is contained in:
parent
47c43e9c28
commit
623e4724c2
@ -15,6 +15,7 @@ import java.util.List;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.GBActivitySample;
|
import nodomain.freeyourgadget.gadgetbridge.GBActivitySample;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.GBDevice;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
|
|
||||||
public class AbstractChartFragment extends Fragment {
|
public class AbstractChartFragment extends Fragment {
|
||||||
public static final String ACTION_REFRESH
|
public static final String ACTION_REFRESH
|
||||||
@ -86,27 +87,28 @@ public class AbstractChartFragment extends Fragment {
|
|||||||
return GBApplication.getActivityDatabaseHandler().getGBActivitySamples(tsFrom, tsTo, provider);
|
return GBApplication.getActivityDatabaseHandler().getGBActivitySamples(tsFrom, tsTo, provider);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void configureChartDefaults(Chart<?> mChart) {
|
protected void configureChartDefaults(Chart<?> chart) {
|
||||||
// if enabled, the chart will always start at zero on the y-axis
|
// if enabled, the chart will always start at zero on the y-axis
|
||||||
|
chart.setNoDataText(getString(R.string.chart_no_data_synchronize));
|
||||||
|
|
||||||
// disable value highlighting
|
// disable value highlighting
|
||||||
mChart.setHighlightEnabled(false);
|
chart.setHighlightEnabled(false);
|
||||||
|
|
||||||
// enable touch gestures
|
// enable touch gestures
|
||||||
mChart.setTouchEnabled(true);
|
chart.setTouchEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void configureBarLineChartDefaults(BarLineChartBase<?> mChart) {
|
protected void configureBarLineChartDefaults(BarLineChartBase<?> chart) {
|
||||||
configureChartDefaults(mChart);
|
configureChartDefaults(chart);
|
||||||
|
|
||||||
// enable scaling and dragging
|
// enable scaling and dragging
|
||||||
mChart.setDragEnabled(true);
|
chart.setDragEnabled(true);
|
||||||
mChart.setScaleEnabled(true);
|
chart.setScaleEnabled(true);
|
||||||
|
|
||||||
// if disabled, scaling can be done on x- and y-axis separately
|
// if disabled, scaling can be done on x- and y-axis separately
|
||||||
// mChart.setPinchZoom(true);
|
// mChart.setPinchZoom(true);
|
||||||
|
|
||||||
mChart.setDrawGridBackground(false);
|
chart.setDrawGridBackground(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected BarEntry createBarEntry(float value, int index) {
|
protected BarEntry createBarEntry(float value, int index) {
|
||||||
|
@ -151,4 +151,5 @@
|
|||||||
<string name="alarm_smart_wakeup">smart wakeup</string>
|
<string name="alarm_smart_wakeup">smart wakeup</string>
|
||||||
<string name="user_feedback_miband_set_alarms_failed">There was an error setting the alarms, please try again!</string>
|
<string name="user_feedback_miband_set_alarms_failed">There was an error setting the alarms, please try again!</string>
|
||||||
<string name="user_feedback_miband_set_alarms_ok">Alarms sent to device!</string>
|
<string name="user_feedback_miband_set_alarms_ok">Alarms sent to device!</string>
|
||||||
|
<string name="chart_no_data_synchronize">No data. Synchronize device?</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user