I've created custom enter animation for a dialog:
<?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%"
android:pivotY="50%"
android:duration="5000" />
Dialog should rotate around it's center... but it doesn't. It rotates around some other point. What's wrong here?
--- Edit: attached more code ---
Dialog creation:
Dialog dialog = new Dialog(SampleActivity.this, R.style.DialogStyle);
dialog.setContentView(R.layout.test_layout);
dialog.show();
styles.xml:
<style name="DialogStyle" parent="android:Theme.Dialog">
<item name="android:windowAnimationStyle">@style/DialogAnimation</item>
</style>
<style name="DialogAnimation">
<item name="android:windowEnterAnimation">@anim/dialog_enter</item>
</style>
test_layout.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="270dip"
android:layout_height="wrap_content">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Random text\nRandom text\nRandom text" />
</LinearLayout>