Merge "Encapsulate background width updates to ActivatableNotificationView" into tm-dev
This commit is contained in:
@@ -226,10 +226,7 @@ public class NotificationShelf extends ActivatableNotificationView implements
|
|||||||
? MathUtils.lerp(shortestWidth, getWidth(), fractionToShade)
|
? MathUtils.lerp(shortestWidth, getWidth(), fractionToShade)
|
||||||
: getWidth();
|
: getWidth();
|
||||||
ActivatableNotificationView anv = (ActivatableNotificationView) this;
|
ActivatableNotificationView anv = (ActivatableNotificationView) this;
|
||||||
NotificationBackgroundView bg = anv.getBackgroundNormal();
|
anv.setBackgroundWidth((int) actualWidth);
|
||||||
if (bg != null) {
|
|
||||||
anv.getBackgroundNormal().setActualWidth((int) actualWidth);
|
|
||||||
}
|
|
||||||
if (mShelfIcons != null) {
|
if (mShelfIcons != null) {
|
||||||
mShelfIcons.setActualLayoutWidth((int) actualWidth);
|
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() {
|
public void setBackgroundWidth(int width) {
|
||||||
return mBackgroundNormal;
|
if (mBackgroundNormal == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mBackgroundNormal.setActualWidth(width);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user