How can I use refresh logo in my activity
Can anyone suggest me how can I use a refresh icon in my activity? I mean to say that my activity takes time to retrieve data from the server during that time I want to show the refreshed logo moving indicating the user that data retrieval is still in progress开发者_如何学编程. So can anyone suggest to me how that can be done? If possible with an example.
I'm not sure, but what about creating your animation with the "refresh logo" you need?
<?xml version="1.0" encoding="UTF-8"?>
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim0" />
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim1" />
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim2" />
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim3" />
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim4" />
<item android:duration="200" android:drawable="@drawable/stat_sys_wifi_signal_1_anim5" />
</animation-list>
Playing with duration, you can display whatever you want at the time you want. More info here.
After, define and show your own CustomDialog, like this example, instead of the standard progess dialog.
If your "refresh logo" is a static image, previus link should be enough.
Use AsyncTask with ProgressDialog.
For more information, here is a great article given: https://sites.google.com/site/androidhowto/how-to-1/asynctasks-with-progressdialogs
You could use a ProgressDialog. There's also the ProgressBar widget.
create custom view , which contains a rotating portion of circle visible .
精彩评论