Skip to content

Commit

Permalink
fix(android): fix losing elevation effect after dimensions change (#1…
Browse files Browse the repository at this point in the history
…1280)

Fixes the loss of the elevation property effect after a view's dimensions have been changed
dynamically

Fixes TIMOB-25945
  • Loading branch information
ypbnv authored and sgtcoolguy committed Dec 16, 2019
1 parent a92edcd commit f46784b
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -108,6 +108,16 @@ public void getOutline(View view, Outline outline)
}
}

@Override
public void onDescendantInvalidated(View child, View target)
{
// Also invalidate outline to recalculate drop shadow.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
invalidateOutline();
}
super.onDescendantInvalidated(child, target);
}

public void setColor(int color)
{
this.color = color;
Expand Down

0 comments on commit f46784b

Please sign in to comment.