Merge "Fixed an issue where group children had rounded corners" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-05-30 20:26:45 +00:00
committed by Android (Google) Code Review
3 changed files with 5 additions and 1 deletions

View File

@@ -710,6 +710,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
updateClickAndFocus();
if (mNotificationParent != null) {
setOverrideTintColor(NO_COLOR, 0.0f);
// Let's reset the distance to top roundness, as this isn't applied to group children
setDistanceToTopRoundness(NO_ROUNDNESS);
mNotificationParent.updateBackgroundForGroupState();
}
updateIconVisibilities();

View File

@@ -36,6 +36,7 @@ import java.util.ArrayList;
*/
public abstract class ExpandableView extends FrameLayout {
public static final float NO_ROUNDNESS = -1;
protected OnHeightChangedListener mOnHeightChangedListener;
private int mActualHeight;
protected int mClipTopAmount;

View File

@@ -776,7 +776,8 @@ public class NotificationStackScrollLayout extends ViewGroup
boolean clip = clipStart > start && clipStart < end
|| clipEnd >= start && clipEnd <= end;
clip &= !(first && mOwnScrollY == 0);
child.setDistanceToTopRoundness(clip ? Math.max(start - clipStart, 0) : -1);
child.setDistanceToTopRoundness(clip ? Math.max(start - clipStart, 0)
: ExpandableView.NO_ROUNDNESS);
first = false;
}
}