Reputation: 586
In order to avoid lag and the bug in which a portion of a previous layout is still showing, I want to only set the visibility of a View to visible only when the previous layout is no longer visible. How do I attach a listener to see if the previous layout is no longer visible?
Upvotes: 0
Views: 1464
Reputation: 364
Maybe you can use onVisibilityChanged
?
protected void onVisibilityChanged (View changedView,
int visibility)
Called when the visibility of the view or an ancestor of the view has changed.
Documentation link:
Upvotes: 1