Merge "Smaller notification icons on AOD" into qt-dev
This commit is contained in:
@@ -252,6 +252,9 @@
|
|||||||
<!-- size at which Notification icons will be drawn on Ambient Display -->
|
<!-- size at which Notification icons will be drawn on Ambient Display -->
|
||||||
<dimen name="status_bar_icon_drawing_size_dark">@*android:dimen/notification_header_icon_size_ambient</dimen>
|
<dimen name="status_bar_icon_drawing_size_dark">@*android:dimen/notification_header_icon_size_ambient</dimen>
|
||||||
|
|
||||||
|
<!-- size of notification icons on AOD -->
|
||||||
|
<dimen name="dark_shelf_icon_size">16dp</dimen>
|
||||||
|
|
||||||
<!-- opacity at which Notification icons will be drawn in the status bar -->
|
<!-- opacity at which Notification icons will be drawn in the status bar -->
|
||||||
<item type="dimen" name="status_bar_icon_drawing_alpha">90%</item>
|
<item type="dimen" name="status_bar_icon_drawing_alpha">90%</item>
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ public class NotificationShelf extends ActivatableNotificationView implements
|
|||||||
private int mIconAppearTopPadding;
|
private int mIconAppearTopPadding;
|
||||||
private int mShelfAppearTranslation;
|
private int mShelfAppearTranslation;
|
||||||
private float mDarkShelfPadding;
|
private float mDarkShelfPadding;
|
||||||
|
private float mDarkShelfIconSize;
|
||||||
private int mStatusBarHeight;
|
private int mStatusBarHeight;
|
||||||
private int mStatusBarPaddingStart;
|
private int mStatusBarPaddingStart;
|
||||||
private AmbientState mAmbientState;
|
private AmbientState mAmbientState;
|
||||||
@@ -151,6 +152,7 @@ public class NotificationShelf extends ActivatableNotificationView implements
|
|||||||
mScrollFastThreshold = res.getDimensionPixelOffset(R.dimen.scroll_fast_threshold);
|
mScrollFastThreshold = res.getDimensionPixelOffset(R.dimen.scroll_fast_threshold);
|
||||||
mShowNotificationShelf = res.getBoolean(R.bool.config_showNotificationShelf);
|
mShowNotificationShelf = res.getBoolean(R.bool.config_showNotificationShelf);
|
||||||
mIconSize = res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_icon_size);
|
mIconSize = res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_icon_size);
|
||||||
|
mDarkShelfIconSize = res.getDimensionPixelOffset(R.dimen.dark_shelf_icon_size);
|
||||||
mGapHeight = res.getDimensionPixelSize(R.dimen.qs_notification_padding);
|
mGapHeight = res.getDimensionPixelSize(R.dimen.qs_notification_padding);
|
||||||
|
|
||||||
if (!mShowNotificationShelf) {
|
if (!mShowNotificationShelf) {
|
||||||
@@ -705,12 +707,13 @@ public class NotificationShelf extends ActivatableNotificationView implements
|
|||||||
}
|
}
|
||||||
notificationIconPosition += iconTopPadding;
|
notificationIconPosition += iconTopPadding;
|
||||||
float shelfIconPosition = getTranslationY() + icon.getTop();
|
float shelfIconPosition = getTranslationY() + icon.getTop();
|
||||||
shelfIconPosition += (icon.getHeight() - icon.getIconScale() * mIconSize) / 2.0f;
|
float iconSize = mDark ? mDarkShelfIconSize : mIconSize;
|
||||||
|
shelfIconPosition += (icon.getHeight() - icon.getIconScale() * iconSize) / 2.0f;
|
||||||
float iconYTranslation = NotificationUtils.interpolate(
|
float iconYTranslation = NotificationUtils.interpolate(
|
||||||
notificationIconPosition - shelfIconPosition,
|
notificationIconPosition - shelfIconPosition,
|
||||||
0,
|
0,
|
||||||
transitionAmount);
|
transitionAmount);
|
||||||
float shelfIconSize = mIconSize * icon.getIconScale();
|
float shelfIconSize = iconSize * icon.getIconScale();
|
||||||
float alpha = 1.0f;
|
float alpha = 1.0f;
|
||||||
boolean noIcon = !row.isShowingIcon();
|
boolean noIcon = !row.isShowingIcon();
|
||||||
if (noIcon) {
|
if (noIcon) {
|
||||||
|
|||||||
Reference in New Issue
Block a user