0
hey les gars que je cherche à faire un fragment du mobile lors de l'exécution afin que je puisse travailler sur d'autres fragments en gardant aside.following est mon main.xmlcomment faire des fragments mobiles dans l'exécution
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
// ce fragment doit être mobile
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.95"
android:orientation="vertical" >
<fragment
android:id="@+id/fragment2"
android:name="com.harshal.fragments.Fragment2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="11.02" >
<!-- Preview: [email protected]/fragment2 -->
</fragment>
<fragment
android:id="@+id/fragment3"
android:name="com.harshal.fragments.Fragment3"
android:layout_width="fill_parent"
android:layout_height="373dp"
android:layout_weight="1" >
<!-- Preview: [email protected]/mainchart -->
</fragment>
</LinearLayout>
</LinearLayout>
veuillez effacer votre question. – kyogs
ce que vous voulez? Vous voulez changer fragment2 en fragment3 ... ??? – kyogs
désolé pour la confusion je veux rendre l'utilisateur capable d'échanger les positions des deux fragments dans l'exécution, c'est-à-dire fragment1 au fragment2 et fragment2 au fragment1 –