Merge "Fix regression in swiping over rotation button." into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
287d4327cd
@@ -114,6 +114,10 @@ public class ButtonDispatcher {
|
||||
return mVisibility != null ? mVisibility : View.VISIBLE;
|
||||
}
|
||||
|
||||
public boolean isVisible() {
|
||||
return getVisibility() == View.VISIBLE;
|
||||
}
|
||||
|
||||
public float getAlpha() {
|
||||
return mAlpha != null ? mAlpha : 1;
|
||||
}
|
||||
|
||||
@@ -336,13 +336,14 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
|
||||
int x = (int) event.getX();
|
||||
int y = (int) event.getY();
|
||||
mDownHitTarget = HIT_TARGET_NONE;
|
||||
if (mBackButtonBounds.contains(x, y)) {
|
||||
if (getBackButton().isVisible() && mBackButtonBounds.contains(x, y)) {
|
||||
mDownHitTarget = HIT_TARGET_BACK;
|
||||
} else if (mHomeButtonBounds.contains(x, y)) {
|
||||
} else if (getHomeButton().isVisible() && mHomeButtonBounds.contains(x, y)) {
|
||||
mDownHitTarget = HIT_TARGET_HOME;
|
||||
} else if (mRecentsButtonBounds.contains(x, y)) {
|
||||
} else if (getRecentsButton().isVisible() && mRecentsButtonBounds.contains(x, y)) {
|
||||
mDownHitTarget = HIT_TARGET_OVERVIEW;
|
||||
} else if (mRotationButtonBounds.contains(x, y)) {
|
||||
} else if (getRotateSuggestionButton().isVisible()
|
||||
&& mRotationButtonBounds.contains(x, y)) {
|
||||
mDownHitTarget = HIT_TARGET_ROTATION;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user