change from EditText.clearFocus() to CompassView.requestFocus() - no more recursion

This commit is contained in:
Peter Siegmund committed 2015-06-26 18:23:04 +02:00
1 parent 12f589fdfd
commit 16065415fc
1 file changed
+4 -1
@@ -86,6 +86,9 @@ public class CompassView extends RelativeLayout {
return false;
}
});
setFocusable(true);
setFocusableInTouchMode(true);
}
private void generateAndShowAlert() {
@@ -166,7 +169,7 @@ public class CompassView extends RelativeLayout {
if (Math.abs(degree) == 360) {
degree = 0;
}
degreeView.clearFocus();
requestFocus();
changeListener.onDirectionChanged(degree);
}
}