У меня странная проблема, когда я пытаюсь анимировать ImageView, который «перевернулся» еще один ImageView в RelativeLayout.Android анимация анимация другой ImageView, который не определен
Проблема заключается в том, что ImageView, который оживляет его, всегда находится на «фоне». Вот код: (Я пытаюсь оживить processing_weel но это анимированное это processing_back !! Если я изменить порядок в RelativeLayout (processing_weel первым, а затем просто назад processing_back он работает нормально)
Layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ImageView
...
/>
<TextView
...
/>
<ImageView
android:id="@+id/processing_back"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/processing_back" />
<ImageView
android:id="@+id/processing_weel"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/processing_weel" />
</RelativeLayout>
Java
/**
* Comienza las animaciones
*/
private void startAnimations(){
ImageView processingWeel = (ImageView) findViewById(R.id.processing_weel);
Animation animacion = AnimationUtils.loadAnimation(this, R.anim.processing_rotation);
animacion.setRepeatCount(Animation.INFINITE);
animacion.setInterpolator(new LinearInterpolator());
processingWeel.startAnimation(animacion);
}
processing_rotation.xml
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50.80%"
android:pivotY="50%"
android:duration="1700"/>
Любая помощь пожалуйста ?????
Спасибо!