Sometimes, when logging on to obtain data, you need to use a circular progress, but you do not want to use a dialog, because the dialog should be popped up so that the page will lose the focus.
You can use the animation effect to replace it.
Add an imageview to the XML file and set the background to an animation.
Code:
<Imageview
Android: Id = "@ + ID/logining_anim_imgview"
Android: Background = "@ anim/logining_anim"
Android: gravity = "center"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content">
</Imageview>
Anim/logining_anim:
<? XML version = "1.0" encoding = "UTF-8"?>
<Animation-list
Xmlns: Android = "http://schemas.android.com/apk/res/android"
Android: oneshot = "false">
<Item
Android: duration= "150"
Android: drawable = "@ drawable/login_1">
</Item>
<Item
Android: duration= "150"
Android: drawable = "@ drawable/login_2">
</Item>
<Item
Android: duration= "150"
Android: drawable = "@ drawable/login_3">
</Item>
<Item
Android: duration= "150"
Android: drawable = "@ drawable/login_4">
</Item>
<Item
Android: duration= "150"
Android: drawable = "@ drawable/login_5">
</Item>
<Item
Android: duration= "150"
Android: drawable = "@ drawable/login_6">
</Item>
</Animation-List>