title: How to remove a included layout from parent layout and add it again?
body: <pre><code>&lt;FrameLayout android:id="@+id/layout1"
          android:layout_width="@dimen/panel_width"
          android:layout_height="wrap_content"
          android:layout_gravity="@integer/layout_gravity"
          android:paddingStart="@dimen/side_padding"
          android:paddingEnd="@dimen/side_padding"
          android:visibility="gone"&gt;
      &lt;FrameLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:elevation="2dp"
              android:background="@drawable/background"&gt;
          &lt;include layout="@layout/layout2" /&gt;
      &lt;/FrameLayout&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>Above layout is inside another layout and now I want to remove layout2 and add it again programatically how can i do that?</p>