Loading packages/SystemUI/res/layout/status_bar_notification_shelf.xml +2 −2 Original line number Diff line number Diff line Loading @@ -35,8 +35,8 @@ android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingStart="13dp" android:paddingEnd="13dp" android:paddingStart="@dimen/shelf_icon_container_padding" android:paddingEnd="@dimen/shelf_icon_container_padding" android:gravity="center_vertical" /> <com.android.systemui.statusbar.notification.FakeShadowView Loading packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,9 @@ <!-- Height of a the shelf with the notification icons --> <dimen name="notification_shelf_height">32dp</dimen> <!-- the padding of the shelf icon container --> <dimen name="shelf_icon_container_padding">13dp</dimen> <!-- The padding of a notification icon on top to the start of the notification. Used for custom views where the distance can't be measured --> <dimen name="notification_icon_appear_padding">15dp</dimen> Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +6 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,12 @@ public class NotificationShelf extends ActivatableNotificationView { R.dimen.status_bar_padding_start); mPaddingBetweenElements = getResources().getDimensionPixelSize( R.dimen.notification_divider_height); ViewGroup.LayoutParams layoutParams = getLayoutParams(); layoutParams.height = getResources().getDimensionPixelOffset( R.dimen.notification_shelf_height); setLayoutParams(layoutParams); int padding = getResources().getDimensionPixelOffset(R.dimen.shelf_icon_container_padding); mShelfIcons.setPadding(padding, 0, padding, 0); } @Override Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java +7 −5 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ import android.graphics.Rect; import android.support.annotation.NonNull; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; import android.widget.FrameLayout; import com.android.internal.util.NotificationColorUtil; import com.android.systemui.R; Loading Loading @@ -73,16 +73,18 @@ public class NotificationIconAreaController { public void onDensityOrFontScaleChanged(Context context) { reloadDimens(context); final LinearLayout.LayoutParams params = generateIconLayoutParams(); final FrameLayout.LayoutParams params = generateIconLayoutParams(); for (int i = 0; i < mNotificationIcons.getChildCount(); i++) { View child = mNotificationIcons.getChildAt(i); child.setLayoutParams(params); child = mShelfIcons.getChildAt(i); child.setLayoutParams(params); } } @NonNull private LinearLayout.LayoutParams generateIconLayoutParams() { return new LinearLayout.LayoutParams( private FrameLayout.LayoutParams generateIconLayoutParams() { return new FrameLayout.LayoutParams( mIconSize + 2 * mIconHPadding, getHeight()); } Loading Loading @@ -203,7 +205,7 @@ public class NotificationIconAreaController { hostLayout.removeView(toRemove.get(i)); } final LinearLayout.LayoutParams params = generateIconLayoutParams(); final FrameLayout.LayoutParams params = generateIconLayoutParams(); for (int i = 0; i < toShow.size(); i++) { View v = toShow.get(i); // The view might still be transiently added if it was just removed and added again Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +0 −1 Original line number Diff line number Diff line Loading @@ -1074,7 +1074,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, updateClearAll(); inflateEmptyShadeView(); updateEmptyShadeView(); inflateShelf(); mStatusBarKeyguardViewManager.onDensityOrFontScaleChanged(); mUserInfoController.onDensityOrFontScaleChanged(); if (mUserSwitcherController != null) { Loading Loading
packages/SystemUI/res/layout/status_bar_notification_shelf.xml +2 −2 Original line number Diff line number Diff line Loading @@ -35,8 +35,8 @@ android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingStart="13dp" android:paddingEnd="13dp" android:paddingStart="@dimen/shelf_icon_container_padding" android:paddingEnd="@dimen/shelf_icon_container_padding" android:gravity="center_vertical" /> <com.android.systemui.statusbar.notification.FakeShadowView Loading
packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,9 @@ <!-- Height of a the shelf with the notification icons --> <dimen name="notification_shelf_height">32dp</dimen> <!-- the padding of the shelf icon container --> <dimen name="shelf_icon_container_padding">13dp</dimen> <!-- The padding of a notification icon on top to the start of the notification. Used for custom views where the distance can't be measured --> <dimen name="notification_icon_appear_padding">15dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +6 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,12 @@ public class NotificationShelf extends ActivatableNotificationView { R.dimen.status_bar_padding_start); mPaddingBetweenElements = getResources().getDimensionPixelSize( R.dimen.notification_divider_height); ViewGroup.LayoutParams layoutParams = getLayoutParams(); layoutParams.height = getResources().getDimensionPixelOffset( R.dimen.notification_shelf_height); setLayoutParams(layoutParams); int padding = getResources().getDimensionPixelOffset(R.dimen.shelf_icon_container_padding); mShelfIcons.setPadding(padding, 0, padding, 0); } @Override Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java +7 −5 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ import android.graphics.Rect; import android.support.annotation.NonNull; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; import android.widget.FrameLayout; import com.android.internal.util.NotificationColorUtil; import com.android.systemui.R; Loading Loading @@ -73,16 +73,18 @@ public class NotificationIconAreaController { public void onDensityOrFontScaleChanged(Context context) { reloadDimens(context); final LinearLayout.LayoutParams params = generateIconLayoutParams(); final FrameLayout.LayoutParams params = generateIconLayoutParams(); for (int i = 0; i < mNotificationIcons.getChildCount(); i++) { View child = mNotificationIcons.getChildAt(i); child.setLayoutParams(params); child = mShelfIcons.getChildAt(i); child.setLayoutParams(params); } } @NonNull private LinearLayout.LayoutParams generateIconLayoutParams() { return new LinearLayout.LayoutParams( private FrameLayout.LayoutParams generateIconLayoutParams() { return new FrameLayout.LayoutParams( mIconSize + 2 * mIconHPadding, getHeight()); } Loading Loading @@ -203,7 +205,7 @@ public class NotificationIconAreaController { hostLayout.removeView(toRemove.get(i)); } final LinearLayout.LayoutParams params = generateIconLayoutParams(); final FrameLayout.LayoutParams params = generateIconLayoutParams(); for (int i = 0; i < toShow.size(); i++) { View v = toShow.get(i); // The view might still be transiently added if it was just removed and added again Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +0 −1 Original line number Diff line number Diff line Loading @@ -1074,7 +1074,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, updateClearAll(); inflateEmptyShadeView(); updateEmptyShadeView(); inflateShelf(); mStatusBarKeyguardViewManager.onDensityOrFontScaleChanged(); mUserInfoController.onDensityOrFontScaleChanged(); if (mUserSwitcherController != null) { Loading