Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Create a placeholder for the new fragment you want to add (in your XML), something like this...</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/menu_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" &gt; &lt;FrameLayout android:id="@+android:id/realtabcontent" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" /&gt; &lt;fragment android:id="@+id/classification_fragment" android:name="uk.colessoft.android.hilllist.fragments.MenuClassificationFragment" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" tools:layout="@layout/list_classifications" &gt; &lt;/fragment&gt; &lt;fragment android:id="@+id/map" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" class="com.google.android.gms.maps.SupportMapFragment" /&gt; &lt;/LinearLayout&gt; </code></pre> <p>Then, instead of adding a new fragment at runtime, replace the content of the empty container... </p> <pre><code>FragmentManager fragmentManager = getSupportFragmentManager(); android.support.v4.app.FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); MenuCountryFragment countryFragment=new MenuCountryFragment(); fragmentTransaction.replace(R.id.realtabcontent, newFrag).commit(); fragmentManager.executePendingTransactions(); </code></pre> <p>Hope this helps. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload