Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ class ClockFaceView extends RadialViewGroup implements OnRotateListener {

private String[] values;

private float currentHandRotation;
private float currentHandDegrees;
private float currentHandLevel;

private final ColorStateList textColor;

Expand Down Expand Up @@ -366,11 +367,14 @@ private RadialGradient getGradientForTextView(RectF selectorBox, TextView tv) {
}

@Override
public void onRotate(float rotation, boolean animating) {
if (abs(currentHandRotation - rotation) > EPSILON) {
currentHandRotation = rotation;
findIntersectingTextView();
public void onRotate(float degrees, int level, boolean animating) {
if (currentHandDegrees == degrees && currentHandLevel == level) {
return;
}

currentHandDegrees = degrees;
currentHandLevel = level;
findIntersectingTextView();
}

@Override
Expand Down
Loading