Make the vertical navbar 48dp like the horizontal one.
When the navigation bar was originally introduced to phones (in change Ic613a335) we wanted it to stick to the same spot on the display so that it felt as much as possible like a physical button array; pressing the same fingertip-sized spot on the glass should always invoke BACK, etc. This meant flipping the nav bar to a vertical orientation when the phone was in landscape, and then juggling around the window insets and other system windows to make room for it. For reasons that are now lost to time, in that original implementation we made the vertical navigation bar narrower: 42dp (versus 48dp for the horizontal navigation bar, which incidentally is always horizontal on tablet-type devices). Nobody really noticed (except app developers looking to hardcode this value instead of just using fitSystemWindows or the new WindowInsets). Here we finally make the navigation bars match perfectly in portrait and landscape. Bug: 23724209 Change-Id: I861be84b41c6a227d269469686c8c66a32029f1d
@@ -37,7 +37,7 @@
|
||||
<!-- Height of the bottom navigation bar in portrait; often the same as @dimen/navigation_bar_height -->
|
||||
<dimen name="navigation_bar_height_landscape">48dp</dimen>
|
||||
<!-- Width of the navigation bar when it is placed vertically on the screen -->
|
||||
<dimen name="navigation_bar_width">42dp</dimen>
|
||||
<dimen name="navigation_bar_width">48dp</dimen>
|
||||
<!-- Height of notification icons in the status bar -->
|
||||
<dimen name="status_bar_icon_size">24dip</dimen>
|
||||
<!-- Size of the giant number (unread count) in the notifications -->
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 942 B |
|
Before Width: | Height: | Size: 780 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1015 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1007 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 613 B |
|
Before Width: | Height: | Size: 698 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 919 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -213,7 +213,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:contentDescription="@string/accessibility_menu"
|
||||
android:src="@drawable/ic_sysbar_menu_land"
|
||||
android:src="@drawable/ic_sysbar_menu"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_gravity="top"
|
||||
android:visibility="invisible"
|
||||
@@ -223,7 +223,7 @@
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps"
|
||||
android:layout_height="@dimen/navigation_key_width"
|
||||
android:layout_width="match_parent"
|
||||
android:src="@drawable/ic_sysbar_recent_land"
|
||||
android:src="@drawable/ic_sysbar_recent"
|
||||
android:scaleType="center"
|
||||
android:layout_weight="0"
|
||||
android:contentDescription="@string/accessibility_recent"
|
||||
@@ -237,7 +237,7 @@
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
|
||||
android:layout_height="@dimen/navigation_key_width"
|
||||
android:layout_width="match_parent"
|
||||
android:src="@drawable/ic_sysbar_home_land"
|
||||
android:src="@drawable/ic_sysbar_home"
|
||||
android:scaleType="center"
|
||||
systemui:keyCode="3"
|
||||
systemui:keyRepeat="false"
|
||||
@@ -253,7 +253,7 @@
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back"
|
||||
android:layout_height="@dimen/navigation_key_width"
|
||||
android:layout_width="match_parent"
|
||||
android:src="@drawable/ic_sysbar_back_land"
|
||||
android:src="@drawable/ic_sysbar_back"
|
||||
android:scaleType="center"
|
||||
systemui:keyCode="4"
|
||||
android:layout_weight="0"
|
||||
|
||||
@@ -257,11 +257,11 @@ public class NavigationBarView extends LinearLayout {
|
||||
|
||||
private void getIcons(Resources res) {
|
||||
mBackIcon = res.getDrawable(R.drawable.ic_sysbar_back);
|
||||
mBackLandIcon = res.getDrawable(R.drawable.ic_sysbar_back_land);
|
||||
mBackLandIcon = mBackIcon;
|
||||
mBackAltIcon = res.getDrawable(R.drawable.ic_sysbar_back_ime);
|
||||
mBackAltLandIcon = res.getDrawable(R.drawable.ic_sysbar_back_ime_land);
|
||||
mBackAltLandIcon = mBackAltIcon;
|
||||
mRecentIcon = res.getDrawable(R.drawable.ic_sysbar_recent);
|
||||
mRecentLandIcon = res.getDrawable(R.drawable.ic_sysbar_recent_land);
|
||||
mRecentLandIcon = mRecentIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||