Bir düğmeyi tıklattığımda bir parçayı silebilirim ve silinen ile başka 2 parçacığım var, ilk parçanın silinmesi ne istiyorsa diğer ikisi boş alanı doldurur Silinen fragman nedeniyle. ben silinir bir düğmeye tıkladığınızdaanaakıcılığın parçasının düzenini değiştirme
ve:
ama boş alan olduğundan, ben iki fragmanları boşluğu düzgün
doldurmak istiyor Activity_main_Layout.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<FrameLayout
android:layout_width="87dp"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:id="@+id/frml"></FrameLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.pack2.t9ahbin.MainActivity"
android:orientation="vertical"
android:id="@+id/linear"
>
<fragment
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.example.pack2.t9ahbin.FragA"
android:id="@+id/fragment"
android:layout_weight="1"
/>
<fragment
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.example.pack2.t9ahbin.fragB"
android:id="@+id/fragment2"
android:layout_weight="1"
/>
</LinearLayout>
</LinearLayout>
ebeveyn etkinlik düzenini –