Loading page occlusion time-consuming operation task page — Android progresslayout of third-party open source

The androidprogresslayout implementation adds a circular progress bar to the interface. Call the setprogress () method to show and hide the progress bar

In the development of Android, there are often such needs, such as a time-consuming operation, networking to obtain network pictures and content, database time-consuming reading and writing, etc. in this time-consuming operation process, developers may not want users to carry out other operations (other operations may cause logical confusion), At this time, you need to give the user an additional loading page to block the operation of the main logic code. After the time-consuming operation of the main page is completed, it will disappear automatically. In this way, the over loaded page will recover the page that should be displayed normally.

For example, if the code uses Android WebView to open a web link and try to load a website, but the network quality is poor and takes a long time, the better user experience is to give the user a loading progress page to block the WebView. When the loaded content is successful, switch back to the normal logical page completely.

Android progresslayout implements this function. The project homepage of Android progresslayout on GitHub is: https://github.com/antonkrasov/AndroidProgressLayout

The test code is as follows:

activity_ main.xml:

MainActivity.java:

The above contents are all the descriptions of the loading page and the time-consuming operation task page -- the third-party open source Android progresslayout shared by Xiaobian. I hope you like it.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>