Skip to content

Commit

Permalink
Enable preview in Android studio
Browse files Browse the repository at this point in the history
Don't start the animation, animations will throw an exception in Preview mode.
  • Loading branch information
Dennis van den Munckhof authored and Dennis van den Munckhof committed Apr 21, 2016
1 parent 51dd868 commit b2b78e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/main/java/pl/tajchert/sample/DotsTextView.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void onAnimationUpdate(ValueAnimator valueAnimator) {
period / 6), createDotJumpAnimator(dotThree, period * 2 / 6));

isPlaying = autoPlay;
if(autoPlay) {
if (autoPlay && !isInEditMode()) {
start();
}
}
Expand Down

0 comments on commit b2b78e8

Please sign in to comment.