Skip to content

Commit

Permalink
Fix reveal layout invalidation rect refresh
Browse files Browse the repository at this point in the history
If the view that is being revealed is not layed out (e.g. the view's
visibility was set to GONE), when the reveal support reveal animation is
created, the target invalidation rect is empty, and the animation is not
drawn.
  • Loading branch information
darius-janusauskas committed Jul 4, 2015
1 parent 4fc0f3b commit f3f1409
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public void onRevealAnimationCancel() {
@Override
public void setRevealRadius(float radius){
mRadius = radius;
mRevealInfo.getTarget().getHitRect(mTargetBounds);
invalidate(mTargetBounds);
}

Expand All @@ -75,7 +76,6 @@ public float getRevealRadius(){
*/
@Override
public void attachRevealInfo(RevealInfo info) {
info.getTarget().getHitRect(mTargetBounds);
mRevealInfo = info;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public void onRevealAnimationCancel() {
@Override
public void setRevealRadius(float radius){
mRadius = radius;
mRevealInfo.getTarget().getHitRect(mTargetBounds);
invalidate(mTargetBounds);
}

Expand All @@ -75,7 +76,6 @@ public float getRevealRadius(){
*/
@Override
public void attachRevealInfo(RevealInfo info) {
info.getTarget().getHitRect(mTargetBounds);
mRevealInfo = info;
}

Expand Down

0 comments on commit f3f1409

Please sign in to comment.