Страница 1 из 1

Custom Progress Dialog

Добавлено: 13 апр 2012, 08:10
katso
Хочу анимировать свой рисунок в Progress Dialog

Код: Выделить всё

dialog = ProgressDialog.show(this,null,null);
 dialog.setContentView(R.layout.loader);
в loader.xml

Код: Выделить всё

<ProgressBar android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:indeterminateOnly="true"
    android:indeterminateDrawable="@drawable/loader_anim" 
/>
loader_anim.xml

Код: Выделить всё

<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/image"
android:pivotX="50%"
android:pivotY="50%" />
Но вращается image только в одну сторону и не плавно, настроить скорость, угол и т.д. не могу! Нужно получить

Код: Выделить всё

<rotate
android:duration="18000"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="-360" 
android:repeatCount="infinite"
android:interpolator="@android:anim/linear_interpolator"/>
У кого нибудь есть соображения на этот счет? может кто сталкивался?