Fixed a bug with the appear animation of the notifications

Bug: 17346264
Change-Id: I0c830c1661342eb0885da5e8dec385d0775f146b
This commit is contained in:
Selim Cinek
2014-09-01 23:08:39 +02:00
parent d9acca5c8e
commit 3969ffa2f5

View File

@@ -31,11 +31,9 @@ public abstract class ExpandableOutlineView extends ExpandableView {
private final Rect mOutlineRect = new Rect();
private boolean mCustomOutline;
private float mDensity;
public ExpandableOutlineView(Context context, AttributeSet attrs) {
super(context, attrs);
mDensity = getResources().getDisplayMetrics().density;
setOutlineProvider(new ViewOutlineProvider() {
@Override
public void getOutline(View view, Outline outline) {
@@ -78,8 +76,8 @@ public abstract class ExpandableOutlineView extends ExpandableView {
mOutlineRect.set((int) left, (int) top, (int) right, (int) bottom);
// Outlines need to be at least 1 dp
mOutlineRect.bottom = (int) Math.max(top + mDensity, mOutlineRect.bottom);
mOutlineRect.right = (int) Math.max(left + mDensity, mOutlineRect.right);
mOutlineRect.bottom = (int) Math.max(top, mOutlineRect.bottom);
mOutlineRect.right = (int) Math.max(left, mOutlineRect.right);
invalidateOutline();
}