0

I have two horizontal fragments. The left one has defined width and the right one should fill left space.

<LinearLayout
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >
    <FrameLayout
        android:id="@+id/a_two_containers_left"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
    />
    <FrameLayout
        android:id="@+id/a_two_containers_right"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
    />
</LinearLayout>

I would like to hide left fragment and make the right one bigger. Of course it should be animated. The hiding animation is no problem

    ft = getFragmentManager().beginTransaction();
    ft.setCustomAnimations(R.anim.slide_left, R.anim.alide_right);
    ft.hide(LEFT_FRAGMENT);
    ft.commit();

Now after this animation the right fragments become bigger and fill entire screen, which is correct.

The problem is how should I start the second animation, which will animate the right fragment becoming bigger.

Martin K
  • 61
  • 1
  • 10
  • go to this question [http://stackoverflow.com/questions/7718111/android-fragment-standard-transition-not-animating?rq=1](http://stackoverflow.com/questions/7718111/android-fragment-standard-transition-not-animating?rq=1) might be helpful to you. – M D Feb 23 '14 at 06:44
  • I have no problem with animation itself. Only to start second animation, which will make right fragment bigger. – Martin K Feb 23 '14 at 06:48

0 Answers0