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
…1424)

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

(cherry picked from commit 947e181)

Fixes TIMOB-25945
  • Loading branch information
ypbnv authored and sgtcoolguy committed Jan 9, 2020
1 parent 243afd0 commit 4b8b22a
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
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 4b8b22a

Please sign in to comment.