Faster animation
This commit is contained in:
parent
0bb3188bc8
commit
b4e34db1d2
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -137,7 +137,7 @@ public class WeekStepsChartFragment extends AbstractChartFragment {
|
|||
setupWeekStepsChart();
|
||||
setupTodayStepsChart();
|
||||
|
||||
// refreshIfVisible();
|
||||
// refresh immediately instead of use refreshIfVisible(), for perceived performance
|
||||
refresh();
|
||||
|
||||
return rootView;
|
||||
|
|
Loading…
Reference in New Issue