Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2be7ec67 authored by Adam Powell's avatar Adam Powell
Browse files

Add View methods isAttachedToWindow and hasLayout

isAttachedToWindow does what it says on the label and provides a
standard, public API for checking a view's attachment state. This
removes the need for tracking this out of band in response to
onAttachedToWindow/onDetachedFromWindow in custom view
implementations.

hasLayout returns true whenever the view has been through at least one
call to layout() since the last time it was attached to or detached
from a window. This allows for standard checks in code that needs to
behave differently if first layout has not completed yet, such as
whether or not to no-op an animation in order to set up initial state.

Change-Id: I8dab70dcd5a22a32e260ed50987ccdaa4100072b
parent aa660a04
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment