Animación de la barra de herramientas junto con las transacciones de fragmentos

Tengo MainActivity que está implementando el cajón de la navegación usando el siguiente xml:

<android.support.v4.widget.DrawerLayout xmlns:android ="http://schemas.android.com/apk/res/android" android:id ="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:id="@+id/container_toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <include android:id="@+id/toolbar" layout="@layout/toolbar" /> </LinearLayout> <FrameLayout android:id="@+id/content" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#FFFFFF"/> </LinearLayout> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="240dp" android:layout_height="match_parent" android:layout_gravity ="start" > <ListView android:id="@+id/drawerList" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="5dp" android:divider="@color/material_blue_grey_800" android:dividerHeight="1dp" android:background="#FFFFFF" /> </RelativeLayout> </android.support.v4.widget.DrawerLayout> 

Ahora tengo 3 artículos en mi listview y en chascar en cualesquiera de ellos mi código substituye Framelayout con ese fragmento particular como abajo:

 Fragment f1 = new Fragment() FragmentTransaction ft = getSupportFragmentManager().beginTransaction() ft.setCustomAnimations(R.anim.slide_in,R.anim.hyper_out,R.anim.hyper_in,R.anim.slide_out) ft.replace(R.id.content, f1).addToBackStack(null).commit(); 

El código anterior funciona bien reemplazando el fragmento con animaciones personalizadas como se desee. Sin embargo, mi pregunta es cómo animar la barra de herramientas junto con el fragmento durante las transacciones de fragmentos.

Todos los fragmentos tienen sus respectivos títulos de barra de herramientas que se cambian en el método onActivityCreated () de cada clase de fragmento mediante el código siguiente:

 ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle("Title"); 

¿Debo aplicar animaciones a mis diseños para cubrir la barra de herramientas?

FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.