I have 3 fragments on my activity and i want to hide one of them on the click of a button.... now that's easy using the FrameTransaction to hide it following this answer in Show hide fragment in android using this code
FragmentManager fm = getFragmentManager();
fm.beginTransaction()
.setCustomAnimations(android.R.animator.fade_in, android.R.animator.fade_out)
.show(somefrag)
.commit();
... but my question here is how to extend one of the left fragments to expand and fill its place so i don't have an empty area and instead fill the screen..???
Here is my Activity layout having the 3 containers
<FrameLayout
android:id="@+id/container1"
android:layout_width="match_parent"
android:layout_height="50dip" />
<FrameLayout
android:id="@+id/container2"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:background="#FFFF42" />
<FrameLayout
android:id="@+id/container3"
android:layout_width="match_parent"
android:layout_height="30dip" />