Cómo agregar animación a DialogFragment?
¿Cómo puedo agregar animación a DialogFragment. Mis animaciones son:
Animado
- Animación de Android - Estado de vista inicial
- Android Gauge Animation Pregunta
- ¿Cómo escalar View / ViewGroup - animar el diseño de una manera adecuada?
- ¿Hay un equivalente TweenMax en Java
- RotateAnimation sin duración
<scale android:duration="200" android:fillAfter="false" android:fromXScale="1.0" android:fromYScale="1.0" android:interpolator="@android:anim/linear_interpolator" android:pivotX="50%" android:pivotY="-90%" android:startOffset="200" android:toXScale="0.5" android:toYScale="0.5" /> <translate android:duration="300" android:fromXDelta="0" android:fromYDelta="0" android:toXDelta="-200" android:toYDelta="-200" />
En anim:
<scale android:duration="200" android:fillAfter="false" android:fromXScale="0.5" android:fromYScale="0.5" android:interpolator="@android:anim/linear_interpolator" android:pivotX="50%" android:pivotY="-90%" android:toXScale="1.0" android:toYScale="1.0" /> <translate android:duration="300" android:fromXDelta="-200" android:fromYDelta="-200" android:toXDelta="0" android:toYDelta="0" />
Y mi código:
FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.setCustomAnimations(R.anim.jump_in, R.anim.jump_out, R.anim.jump_in, R.anim.jump_out); ft.add(layer_frag, "layer frag"); ft.show(layer_frag).commit();//layer_frag is a class whitch extends DialogFragment
Debo extrañar algo porque aparece como aparece antes.
- Android cómo configurar windowanimation mediante programación
- Animación de texto en lienzo - Android
- Cómo mostrar la animación en la pantalla de bienvenida con diferentes imágenes en android
- ¿Cómo modificar la propiedad MaxLines de TextView con animación?
- Implemente la animación de la tarjeta entre dos vistas usando AnimatorSet
- Cómo hacer una animación de derecha a izquierda en un diseño
- Android 2.3: Crecer / reducir el error de animación?
- ¿Cómo puedo programar una animación circular rotatoria como esta (foto adjunta)? Androide
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { final Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.getWindow().getAttributes().windowAnimations = R.style.detailDialogAnimation; return dialog; }
La respuesta fue stackoverflow.com/a/13537234/969325 pero tienes que configurar el estilo en la función onCreateDialog
.
- Espresso NestedScrollView
- Samsung Smart Manager informa sobre la aplicación lenta pero muestra información sobre los errores