Computer Science, asked by gonilan5898, 1 year ago

How to use View Stub in android?

Answers

Answered by aditithorat
0

Like the documentation says, ViewStub is a View that is inflated lazily. ViewStub stub = (ViewStub) findViewById(R.id.stub); View inflated = stub.inflate(); When the method inflate() is invoked the ViewStub is removed from its parent and replaced with the right View (the root view of mySubTree layout).

Similar questions