Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can try and go check <a href="http://developer.android.com/reference/android/app/FragmentTransaction.html" rel="nofollow">FragmentTransaction</a></p> <p>Check out replace / add / remove fragment methods. I'm sure you'll find what you are looking for.</p> <p>ex :</p> <pre><code>FragmentTransaction fragmentTransaction = activity.getSupportFragmentManager().beginTransaction(); fragmentTransaction.add(container, fragment); fragmentTransaction.commit(); </code></pre> <p>and stuffs like :</p> <pre><code>FragmentTransaction fragmentTransaction = activity.getSupportFragmentManager().beginTransaction(); fragmentTransaction.replace(container, newFragment); fragmentTransaction.commit(); </code></pre> <p>Where <code>container</code> is a simple View (RelativeLayout or other things).</p> <p><strong>EDIT :</strong></p> <p>Example :</p> <p><em>main.xml</em></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" &gt; &lt;LinearLayout android:id="@+id/fragment_snapshots" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:orientation="vertical" &gt; &lt;fragment android:id="@+id/fragment_snap1" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" /&gt; &lt;fragment android:id="@+id/fragment_snap2" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" /&gt; &lt;/LinearLayout&gt; &lt;fragment android:id="@+id/big_fragment" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" /&gt; &lt;/LinearLayout&gt; </code></pre> <p>This layout specify, almost - except I only have 2 fragments on the left, what you are trying to do.</p> <p>Then using <code>onClickListeners</code> and the function I gave you above, you might be able to do what you want.</p> <p>Your containers will be the different IDs I put (big_fragment, fragment_snap1 &amp; fragment_snap2.</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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