1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 05:16:51 +01:00

Faster animation

This commit is contained in:
cpfeiffer 2015-08-25 01:03:58 +02:00
parent 0bb3188bc8
commit b4e34db1d2
4 changed files with 7 additions and 5 deletions

View File

@ -41,6 +41,8 @@ import nodomain.freeyourgadget.gadgetbridge.util.DateTimeUtils;
import nodomain.freeyourgadget.gadgetbridge.util.DeviceHelper;
public abstract class AbstractChartFragment extends AbstractGBFragment {
protected int ANIM_TIME = 350;
private static final Logger LOG = LoggerFactory.getLogger(ActivitySleepChartFragment.class);
private final Set<String> mIntentFilterActions;

View File

@ -83,7 +83,7 @@ public class ActivitySleepChartFragment extends AbstractChartFragment {
yAxisRight.setDrawTopYLabelEntry(false);
yAxisRight.setTextColor(CHART_TEXT_COLOR);
// refreshIfVisible();
// refresh immediately instead of use refreshIfVisible(), for perceived performance
refresh();
}
@ -111,7 +111,7 @@ public class ActivitySleepChartFragment extends AbstractChartFragment {
}
protected void renderCharts() {
mChart.animateX(500, Easing.EasingOption.EaseInOutQuart);
mChart.animateX(ANIM_TIME, Easing.EasingOption.EaseInOutQuart);
}
protected void setupLegend(Chart chart) {

View File

@ -99,7 +99,7 @@ public class SleepChartFragment extends AbstractChartFragment {
setupActivityChart();
setupSleepAmountChart();
// refreshIfVisible();
// refresh immediately instead of use refreshIfVisible(), for perceived performance
refresh();
return rootView;
@ -177,7 +177,7 @@ public class SleepChartFragment extends AbstractChartFragment {
}
protected void renderCharts() {
mActivityChart.animateX(500, Easing.EasingOption.EaseInOutQuart);
mActivityChart.animateX(ANIM_TIME, Easing.EasingOption.EaseInOutQuart);
mSleepAmountChart.invalidate();
}
}

View File

@ -137,7 +137,7 @@ public class WeekStepsChartFragment extends AbstractChartFragment {
setupWeekStepsChart();
setupTodayStepsChart();
// refreshIfVisible();
// refresh immediately instead of use refreshIfVisible(), for perceived performance
refresh();
return rootView;