Answers for "code to include layout from java in android"

0

code to include layout from java in android

<ViewStub
    android:id="@+id/layout_stub"
    android:inflatedId="@+id/message_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_weight="0.75" />
Posted by: Guest on May-14-2020
0

code to include layout from java in android

ViewStub stub = (ViewStub) findViewById(R.id.layout_stub);
stub.setLayoutResource(R.layout.whatever_layout_you_want);
View inflated = stub.inflate();
Posted by: Guest on May-14-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language