Merge "DO NOT MERGE Adjust NotificationView bottom margin based on whether Keyboard is shown." into qt-qpr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
fd15e010ba
@@ -20,7 +20,8 @@
|
|||||||
android:id="@+id/notification_view"
|
android:id="@+id/notification_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/notification_shade_background_color">
|
android:background="@color/notification_shade_background_color"
|
||||||
|
android:visibility="invisible">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/glass_pane"
|
android:id="@+id/glass_pane"
|
||||||
|
|||||||
@@ -1092,6 +1092,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
|
|||||||
}
|
}
|
||||||
|
|
||||||
mNavigationBarWindow.setVisibility(isKeyboardVisible ? View.GONE : View.VISIBLE);
|
mNavigationBarWindow.setVisibility(isKeyboardVisible ? View.GONE : View.VISIBLE);
|
||||||
|
setNotificationViewBottomMargin(isKeyboardVisible ? 0 : mNavigationBarWindow.getHeight());
|
||||||
mBottomNavBarVisible = !isKeyboardVisible;
|
mBottomNavBarVisible = !isKeyboardVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1155,6 +1156,13 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
|
|||||||
addTemperatureViewToController(mRightNavigationBarView);
|
addTemperatureViewToController(mRightNavigationBarView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setNotificationViewBottomMargin(int bottomMargin) {
|
||||||
|
ViewGroup.MarginLayoutParams params =
|
||||||
|
(ViewGroup.MarginLayoutParams) mNotificationView.getLayoutParams();
|
||||||
|
params.setMargins(params.leftMargin, params.topMargin, params.rightMargin, bottomMargin);
|
||||||
|
mNotificationView.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||||
//When executing dump() function simultaneously, we need to serialize them
|
//When executing dump() function simultaneously, we need to serialize them
|
||||||
|
|||||||
Reference in New Issue
Block a user