public class ViewStubProxy
extends java.lang.Object
Constructor and Description |
---|
ViewStubProxy(android.view.ViewStub viewStub) |
Modifier and Type | Method and Description |
---|---|
ViewDataBinding |
getBinding()
Returns the data binding associated with the inflated layout once it has been inflated.
|
android.view.View |
getRoot()
Returns the root View of the layout replacing the ViewStub once it has been inflated.
|
android.view.ViewStub |
getViewStub()
Returns the ViewStub in the layout or
null if the ViewStub has been inflated. |
boolean |
isInflated()
Returns
true if the ViewStub has replaced itself with the inflated layout
or false if not. |
void |
setContainingBinding(ViewDataBinding containingBinding) |
void |
setOnInflateListener(android.view.ViewStub.OnInflateListener listener)
Sets the
ViewStub.OnInflateListener to be called when the ViewStub inflates. |
public void setContainingBinding(ViewDataBinding containingBinding)
public boolean isInflated()
true
if the ViewStub has replaced itself with the inflated layout
or false
if not.true
if the ViewStub has replaced itself with the inflated layout
or false
if notpublic android.view.View getRoot()
null
is returned prior to inflation.null
is returned prior to inflationpublic ViewDataBinding getBinding()
null
prior to inflation or if there is no binding associated with the layout.null
prior to inflation or if there is no binding associated with the layoutpublic android.view.ViewStub getViewStub()
null
if the ViewStub has been inflated.null
if the ViewStub has been inflated.public void setOnInflateListener(android.view.ViewStub.OnInflateListener listener)
ViewStub.OnInflateListener
to be called when the ViewStub inflates. The proxy must
have an OnInflateListener, so listener
will be called immediately after
the proxy's listener is called.listener
- The OnInflateListener to notify of successful inflation