开发者

Custom ProgressBar in AppWidget (RemoteViews) - doable?

I am trying to create a custom indeterminate ProgressBar for use in an AppWidget - should be supported as RemoteViews can handle ProgressBar - but how do I declare the animated draw开发者_如何转开发able that I want to use in place of the standard system provided animation?


In code/xml you can declare the progressbar and set visible:

android:indeterminateDrawable="@drawable/spin_progress"

The spin_progress.xml would animate the image as rotating.

<animated-rotate
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:drawable="@drawable/imagetorotate"
    android:pivotX="50%"
    android:pivotY="50%"/>


This is not doable - frame animated and other widgets not supported as a remoteview. I ended up overlaying a regular indeterminate ProgressBar over my static AppWidget image - that is available in remoteview...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜