Android implements a waiting box example based on dialog
Recently, I want to find some novel waiting boxes, but I can't find the ideal effect. I have no choice but to do it myself.
Let's see an effect picture first!
The first step is to create a dialog XML file
ic_ loading_ BG is a picture of the background.
About progress in drawable above_ drawable_ The white.xml file is as follows
These 12 are all pictures.
The code of the core display waiting box is as follows
The text can be changed by itself, which is convenient and direct.
For tips for novices, remember to write private dialog ProgressDialog at the beginning; (old bird can ignore this)
There is a style in it. Add the following code to the style.xml file and it's OK!
About how to make this disappear, add it where it needs to disappear
It's OK
Demo download address: ProgressDialog_ jb51.rar
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.