Merge "Use a different width for nav icons in sw600dp-port." into ics-scoop
This commit is contained in:
@ -54,7 +54,7 @@
|
||||
android:clipToPadding="false"
|
||||
>
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back"
|
||||
android:layout_width="80dip"
|
||||
android:layout_width="@dimen/navigation_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_back"
|
||||
systemui:keyCode="4"
|
||||
@ -62,7 +62,7 @@
|
||||
systemui:glowBackground="@drawable/ic_sysbar_highlight"
|
||||
/>
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
|
||||
android:layout_width="80dip"
|
||||
android:layout_width="@dimen/navigation_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_home"
|
||||
systemui:keyCode="3"
|
||||
@ -70,14 +70,14 @@
|
||||
systemui:glowBackground="@drawable/ic_sysbar_highlight"
|
||||
/>
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps"
|
||||
android:layout_width="80dip"
|
||||
android:layout_width="@dimen/navigation_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_recent"
|
||||
android:contentDescription="@string/accessibility_recent"
|
||||
systemui:glowBackground="@drawable/ic_sysbar_highlight"
|
||||
/>
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu"
|
||||
android:layout_width="80dip"
|
||||
android:layout_width="@dimen/navigation_menu_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_menu"
|
||||
systemui:keyCode="82"
|
||||
|
@ -49,7 +49,7 @@
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back"
|
||||
android:layout_width="80dp"
|
||||
android:layout_width="@dimen/navigation_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_back"
|
||||
systemui:keyCode="4"
|
||||
@ -64,7 +64,7 @@
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
|
||||
android:layout_width="80dp"
|
||||
android:layout_width="@dimen/navigation_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_home"
|
||||
systemui:keyCode="3"
|
||||
@ -80,7 +80,7 @@
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps"
|
||||
android:layout_width="80dp"
|
||||
android:layout_width="@dimen/navigation_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_recent"
|
||||
android:layout_weight="0"
|
||||
@ -88,7 +88,7 @@
|
||||
android:contentDescription="@string/accessibility_recent"
|
||||
/>
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="@dimen/navigation_menu_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_menu"
|
||||
systemui:keyCode="82"
|
||||
|
@ -18,5 +18,11 @@
|
||||
<resources>
|
||||
<!-- gap on either side of status bar notification icons -->
|
||||
<dimen name="status_bar_icon_padding">0dp</dimen>
|
||||
|
||||
<!-- The width of the view containing non-menu status bar icons -->
|
||||
<dimen name="navigation_key_width">70dip</dimen>
|
||||
|
||||
<!-- The width of the view containing the menu status bar icon -->
|
||||
<dimen name="navigation_menu_key_width">40dip</dimen>
|
||||
</resources>
|
||||
|
||||
|
@ -67,4 +67,10 @@
|
||||
|
||||
<!-- opacity at which Notification icons will be drawn in the status bar -->
|
||||
<item type="dimen" name="status_bar_icon_drawing_alpha">100%</item>
|
||||
|
||||
<!-- The width of the view containing non-menu status bar icons -->
|
||||
<dimen name="navigation_key_width">80dip</dimen>
|
||||
|
||||
<!-- The width of the view containing the menu status bar icon -->
|
||||
<dimen name="navigation_menu_key_width">40dip</dimen>
|
||||
</resources>
|
||||
|
@ -21,5 +21,11 @@
|
||||
|
||||
<!-- opacity at which Notification icons will be drawn in the status bar -->
|
||||
<item type="dimen" name="status_bar_icon_drawing_alpha">100%</item>
|
||||
|
||||
<!-- The width of the view containing non-menu status bar icons -->
|
||||
<dimen name="navigation_key_width">80dip</dimen>
|
||||
|
||||
<!-- The width of the view containing the menu status bar icon -->
|
||||
<dimen name="navigation_menu_key_width">80dip</dimen>
|
||||
</resources>
|
||||
|
||||
|
@ -91,4 +91,9 @@
|
||||
<!-- The padding on the global screenshot background image -->
|
||||
<dimen name="global_screenshot_bg_padding">20dp</dimen>
|
||||
|
||||
<!-- The width of the view containing non-menu status bar icons -->
|
||||
<dimen name="navigation_key_width">80dip</dimen>
|
||||
|
||||
<!-- The width of the view containing the menu status bar icon -->
|
||||
<dimen name="navigation_menu_key_width">40dip</dimen>
|
||||
</resources>
|
||||
|
@ -121,6 +121,8 @@ public class TabletStatusBar extends StatusBar implements
|
||||
int mNaturalBarHeight = -1;
|
||||
int mIconSize = -1;
|
||||
int mIconHPadding = -1;
|
||||
int mNavIconWidth = -1;
|
||||
int mMenuNavIconWidth = -1;
|
||||
private int mMaxNotificationIcons = 5;
|
||||
|
||||
H mHandler = new H();
|
||||
@ -410,6 +412,26 @@ public class TabletStatusBar extends StatusBar implements
|
||||
com.android.internal.R.dimen.system_bar_icon_size);
|
||||
int newIconHPadding = res.getDimensionPixelSize(
|
||||
R.dimen.status_bar_icon_padding);
|
||||
int newNavIconWidth = res.getDimensionPixelSize(R.dimen.navigation_key_width);
|
||||
int newMenuNavIconWidth = res.getDimensionPixelSize(R.dimen.navigation_menu_key_width);
|
||||
|
||||
if (mNavigationArea != null && newNavIconWidth != mNavIconWidth) {
|
||||
mNavIconWidth = newNavIconWidth;
|
||||
|
||||
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
|
||||
mNavIconWidth, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
mBackButton.setLayoutParams(lp);
|
||||
mHomeButton.setLayoutParams(lp);
|
||||
mRecentButton.setLayoutParams(lp);
|
||||
}
|
||||
|
||||
if (mNavigationArea != null && newMenuNavIconWidth != mMenuNavIconWidth) {
|
||||
mMenuNavIconWidth = newMenuNavIconWidth;
|
||||
|
||||
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
|
||||
mMenuNavIconWidth, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
mMenuButton.setLayoutParams(lp);
|
||||
}
|
||||
|
||||
if (newIconHPadding != mIconHPadding || newIconSize != mIconSize) {
|
||||
// Slog.d(TAG, "size=" + newIconSize + " padding=" + newIconHPadding);
|
||||
|
Reference in New Issue
Block a user