From acc5abde1b75d98acd00337a4f4c4fc534bc233c Mon Sep 17 00:00:00 2001 From: Lukas Niemeier Date: Tue, 16 Dec 2014 02:36:24 +0100 Subject: [PATCH 1/2] don't let onLayout prevent overlay bound calculations --- .../cardslib/library/view/ForegroundLinearLayout.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library-core/src/main/java/it/gmariotti/cardslib/library/view/ForegroundLinearLayout.java b/library-core/src/main/java/it/gmariotti/cardslib/library/view/ForegroundLinearLayout.java index 19eb2ace..00d49947 100644 --- a/library-core/src/main/java/it/gmariotti/cardslib/library/view/ForegroundLinearLayout.java +++ b/library-core/src/main/java/it/gmariotti/cardslib/library/view/ForegroundLinearLayout.java @@ -183,7 +183,9 @@ public Drawable getForeground() { @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); - mForegroundBoundsChanged = changed; + if (changed) { + mForegroundBoundsChanged = changed; + } } @Override From a85c46843e1f71af63e6cfcd5bb16741f29d5e9d Mon Sep 17 00:00:00 2001 From: Lukas Niemeier Date: Tue, 16 Dec 2014 02:38:16 +0100 Subject: [PATCH 2/2] clarified intent --- .../gmariotti/cardslib/library/view/ForegroundLinearLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library-core/src/main/java/it/gmariotti/cardslib/library/view/ForegroundLinearLayout.java b/library-core/src/main/java/it/gmariotti/cardslib/library/view/ForegroundLinearLayout.java index 00d49947..23fb8b51 100644 --- a/library-core/src/main/java/it/gmariotti/cardslib/library/view/ForegroundLinearLayout.java +++ b/library-core/src/main/java/it/gmariotti/cardslib/library/view/ForegroundLinearLayout.java @@ -184,7 +184,7 @@ public Drawable getForeground() { protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); if (changed) { - mForegroundBoundsChanged = changed; + mForegroundBoundsChanged = true; } }