Merge "Fix vertical nav button direction issue" into nyc-mr2-dev

This commit is contained in:
Xiaohui Chen
2016-12-05 19:20:16 +00:00
committed by Android (Google) Code Review
2 changed files with 12 additions and 0 deletions

View File

@@ -186,6 +186,16 @@ public class ButtonDispatcher {
}
}
public void setLandscape(boolean landscape) {
final int N = mViews.size();
for (int i = 0; i < N; i++) {
final View view = mViews.get(i);
if (view instanceof ButtonInterface) {
((ButtonInterface) view).setLandscape(landscape);
}
}
}
/**
* Interface for button actions.
*/

View File

@@ -578,6 +578,8 @@ public class NavigationBarView extends LinearLayout {
updateTaskSwitchHelper();
setNavigationIconHints(mNavigationIconHints, true);
getHomeButton().setLandscape(mVertical);
}
private void updateTaskSwitchHelper() {