ViewStub

Class of android.view · ViewStub.java · Android's reference

public final class ViewStub extends View

ViewStub ← View

An invisible, empty view that a layout replaces it with when it becomes visible or is inflated.

Nested types

Constructors

public ViewStub(Context context) source
public ViewStub(Context context, int layoutResource) source
public ViewStub(Context context, AttributeSet attrs) source
public ViewStub(Context context, AttributeSet attrs, int defStyleAttr) source
public ViewStub(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) source

Methods

public int getInflatedId() source
public void setInflatedId(int inflatedId) source
public int getLayoutResource() source
public void setLayoutResource(int layoutResource) source
public void setLayoutInflater(LayoutInflater inflater) source
public LayoutInflater getLayoutInflater() source
public void setOnInflateListener(OnInflateListener inflateListener) source
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) source
public void draw(Canvas canvas) empty body source
protected void dispatchDraw(Canvas canvas) empty body source
public void setVisibility(int visibility) source
public View inflate() source

Replaces the stub in its parent with the layout resource, and gives the inflated view.


Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.