[android] Fix disabling compass

Fixes #2752
This commit is contained in:
Leith Bade
2015-10-23 21:04:24 +11:00
parent 1240f9a019
commit e1d66a7aac
2 changed files with 5 additions and 0 deletions

View File

@@ -83,6 +83,10 @@ final class CompassView extends ImageView {
mDirection = direction;
setRotation((float) direction);
if (!isEnabled()) {
return;
}
if (direction == 0.0) {
if (getVisibility() == View.INVISIBLE) {
return;