Merge "Encapsulate background width updates to ActivatableNotificationView" into tm-dev am: da82413344
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17205159 Change-Id: I7565a49fd8479ab3608377e3a5099bfc118f0bc6
This commit is contained in:
@@ -226,10 +226,7 @@ public class NotificationShelf extends ActivatableNotificationView implements
|
||||
? MathUtils.lerp(shortestWidth, getWidth(), fractionToShade)
|
||||
: getWidth();
|
||||
ActivatableNotificationView anv = (ActivatableNotificationView) this;
|
||||
NotificationBackgroundView bg = anv.getBackgroundNormal();
|
||||
if (bg != null) {
|
||||
anv.getBackgroundNormal().setActualWidth((int) actualWidth);
|
||||
}
|
||||
anv.setBackgroundWidth((int) actualWidth);
|
||||
if (mShelfIcons != null) {
|
||||
mShelfIcons.setActualLayoutWidth((int) actualWidth);
|
||||
}
|
||||
|
||||
@@ -163,10 +163,13 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The background of this view.
|
||||
* @param width The actual width to apply to the background view.
|
||||
*/
|
||||
public NotificationBackgroundView getBackgroundNormal() {
|
||||
return mBackgroundNormal;
|
||||
public void setBackgroundWidth(int width) {
|
||||
if (mBackgroundNormal == null) {
|
||||
return;
|
||||
}
|
||||
mBackgroundNormal.setActualWidth(width);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user