Loading packages/SystemUI/res/layout/signal_cluster_view.xml +2 −2 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ </FrameLayout> <View android:id="@+id/wifi_signal_spacer" android:layout_width="4dp" android:layout_width="@dimen/status_bar_wifi_signal_spacer_width" android:layout_height="4dp" android:visibility="gone" /> Loading Loading @@ -112,7 +112,7 @@ </FrameLayout> <View android:id="@+id/wifi_airplane_spacer" android:layout_width="4dp" android:layout_width="@dimen/status_bar_airplane_spacer_width" android:layout_height="4dp" android:visibility="gone" /> Loading packages/SystemUI/res/layout/status_bar.xml +2 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,8 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:singleLine="true" android:paddingStart="7dp" android:paddingStart="@dimen/status_bar_clock_starting_padding" android:paddingEnd="@dimen/status_bar_clock_end_padding" android:gravity="center_vertical|start" /> </com.android.keyguard.AlphaOptimizedLinearLayout> Loading packages/SystemUI/res/layout/system_icons.xml +3 −3 Original line number Diff line number Diff line Loading @@ -30,11 +30,11 @@ android:id="@+id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="2.5dp"/> android:layout_marginStart="@dimen/signal_cluster_margin_start"/> <!-- battery must be padded below to match assets --> <com.android.systemui.BatteryMeterView android:id="@+id/battery" android:layout_height="14.5dp" android:layout_width="9.5dp" android:layout_height="@dimen/status_bar_battery_icon_height" android:layout_width="@dimen/status_bar_battery_icon_width" android:layout_marginBottom="@dimen/battery_margin_bottom"/> </LinearLayout> No newline at end of file packages/SystemUI/res/values/dimens.xml +25 −1 Original line number Diff line number Diff line Loading @@ -33,9 +33,30 @@ <!-- Height of notification icons in the status bar --> <dimen name="status_bar_icon_size">@*android:dimen/status_bar_icon_size</dimen> <!-- The font size for the clock --> <!-- Height of the battery icon in the status bar. --> <dimen name="status_bar_battery_icon_height">14.5dp</dimen> <!-- Width of the battery icon in the status bar. --> <dimen name="status_bar_battery_icon_width">9.5dp</dimen> <!-- The font size for the clock in the status bar. --> <dimen name="status_bar_clock_size">14sp</dimen> <!-- The starting padding for the clock in the status bar. --> <dimen name="status_bar_clock_starting_padding">7dp</dimen> <!-- The end padding for the clock in the status bar. --> <dimen name="status_bar_clock_end_padding">0dp</dimen> <!-- Spacing after the wifi signals that is present if there are any icons following it. --> <dimen name="status_bar_wifi_signal_spacer_width">4dp</dimen> <!-- Spacing before the airplane mode icon if there are any icons preceding it. --> <dimen name="status_bar_airplane_spacer_width">4dp</dimen> <!-- The amount to scale each of the status bar icons by. A value of 1 means no scaling. --> <item name="status_bar_icon_scale_factor" format="float" type="dimen">1.0</item> <!-- Height of a small notification in the status bar--> <dimen name="notification_min_height">84dp</dimen> Loading Loading @@ -516,6 +537,9 @@ <dimen name="fake_shadow_size">8dp</dimen> <!-- Starting margin before the signal cluster --> <dimen name="signal_cluster_margin_start">2.5dp</dimen> <!-- Padding between signal cluster and battery icon --> <dimen name="signal_cluster_battery_padding">7dp</dimen> Loading packages/SystemUI/src/com/android/systemui/statusbar/ScalingDrawableWrapper.java 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.statusbar; import android.graphics.drawable.Drawable; import android.graphics.drawable.DrawableWrapper; /** * An extension of {@link DrawableWrapper} that will take a given Drawable and scale it by * the given factor. */ class ScalingDrawableWrapper extends DrawableWrapper { private float mScaleFactor; public ScalingDrawableWrapper(Drawable drawable, float scaleFactor) { super(drawable); mScaleFactor = scaleFactor; } @Override public int getIntrinsicWidth() { return (int) (super.getIntrinsicWidth() * mScaleFactor); } @Override public int getIntrinsicHeight() { return (int) (super.getIntrinsicHeight() * mScaleFactor); } } Loading
packages/SystemUI/res/layout/signal_cluster_view.xml +2 −2 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ </FrameLayout> <View android:id="@+id/wifi_signal_spacer" android:layout_width="4dp" android:layout_width="@dimen/status_bar_wifi_signal_spacer_width" android:layout_height="4dp" android:visibility="gone" /> Loading Loading @@ -112,7 +112,7 @@ </FrameLayout> <View android:id="@+id/wifi_airplane_spacer" android:layout_width="4dp" android:layout_width="@dimen/status_bar_airplane_spacer_width" android:layout_height="4dp" android:visibility="gone" /> Loading
packages/SystemUI/res/layout/status_bar.xml +2 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,8 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:singleLine="true" android:paddingStart="7dp" android:paddingStart="@dimen/status_bar_clock_starting_padding" android:paddingEnd="@dimen/status_bar_clock_end_padding" android:gravity="center_vertical|start" /> </com.android.keyguard.AlphaOptimizedLinearLayout> Loading
packages/SystemUI/res/layout/system_icons.xml +3 −3 Original line number Diff line number Diff line Loading @@ -30,11 +30,11 @@ android:id="@+id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="2.5dp"/> android:layout_marginStart="@dimen/signal_cluster_margin_start"/> <!-- battery must be padded below to match assets --> <com.android.systemui.BatteryMeterView android:id="@+id/battery" android:layout_height="14.5dp" android:layout_width="9.5dp" android:layout_height="@dimen/status_bar_battery_icon_height" android:layout_width="@dimen/status_bar_battery_icon_width" android:layout_marginBottom="@dimen/battery_margin_bottom"/> </LinearLayout> No newline at end of file
packages/SystemUI/res/values/dimens.xml +25 −1 Original line number Diff line number Diff line Loading @@ -33,9 +33,30 @@ <!-- Height of notification icons in the status bar --> <dimen name="status_bar_icon_size">@*android:dimen/status_bar_icon_size</dimen> <!-- The font size for the clock --> <!-- Height of the battery icon in the status bar. --> <dimen name="status_bar_battery_icon_height">14.5dp</dimen> <!-- Width of the battery icon in the status bar. --> <dimen name="status_bar_battery_icon_width">9.5dp</dimen> <!-- The font size for the clock in the status bar. --> <dimen name="status_bar_clock_size">14sp</dimen> <!-- The starting padding for the clock in the status bar. --> <dimen name="status_bar_clock_starting_padding">7dp</dimen> <!-- The end padding for the clock in the status bar. --> <dimen name="status_bar_clock_end_padding">0dp</dimen> <!-- Spacing after the wifi signals that is present if there are any icons following it. --> <dimen name="status_bar_wifi_signal_spacer_width">4dp</dimen> <!-- Spacing before the airplane mode icon if there are any icons preceding it. --> <dimen name="status_bar_airplane_spacer_width">4dp</dimen> <!-- The amount to scale each of the status bar icons by. A value of 1 means no scaling. --> <item name="status_bar_icon_scale_factor" format="float" type="dimen">1.0</item> <!-- Height of a small notification in the status bar--> <dimen name="notification_min_height">84dp</dimen> Loading Loading @@ -516,6 +537,9 @@ <dimen name="fake_shadow_size">8dp</dimen> <!-- Starting margin before the signal cluster --> <dimen name="signal_cluster_margin_start">2.5dp</dimen> <!-- Padding between signal cluster and battery icon --> <dimen name="signal_cluster_battery_padding">7dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/statusbar/ScalingDrawableWrapper.java 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.statusbar; import android.graphics.drawable.Drawable; import android.graphics.drawable.DrawableWrapper; /** * An extension of {@link DrawableWrapper} that will take a given Drawable and scale it by * the given factor. */ class ScalingDrawableWrapper extends DrawableWrapper { private float mScaleFactor; public ScalingDrawableWrapper(Drawable drawable, float scaleFactor) { super(drawable); mScaleFactor = scaleFactor; } @Override public int getIntrinsicWidth() { return (int) (super.getIntrinsicWidth() * mScaleFactor); } @Override public int getIntrinsicHeight() { return (int) (super.getIntrinsicHeight() * mScaleFactor); } }