Skip to content

Commit 1b9b3da

Browse files
committed
Add spin animation to pie example
1 parent 0270470 commit 1b9b3da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

MPChartExample/src/com/xxmassdeveloper/mpchartexample/PieChartActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ public boolean onOptionsItemSelected(MenuItem item) {
165165
mChart.animateXY(1400, 1400);
166166
break;
167167
}
168+
case R.id.actionToggleSpin: {
169+
mChart.spin(1000, mChart.getRotationAngle(), mChart.getRotationAngle() + 360, Easing.EasingOption.EaseInCubic);
170+
break;
171+
}
168172
}
169173
return true;
170174
}

0 commit comments

Comments
 (0)