开发者

How to show progressdialog in video view in android

开发者 https://www.devze.com 2023-04-13 03:36 出处:网络
In my activity I have a webview and a video. Both are loading from webservice. First I have to show the progress dialog for the activity after the webview has loaded. I have to show the progress dialo

In my activity I have a webview and a video. Both are loading from webservice. First I have to show the progress dialog for the activity after the webview has loaded. I have to show the progress dialog for the video view u开发者_如何学运维pto video is started.


Regarding Showing progress Bar in Video view: To display progress dialog while video is streaming you need to create class which extends aysnctask example test class. In that test class it is having three default methods like onPreExecuate(),donInBackground() & onPostExecuate().

In onPreExecuate() you need to set visibility of progress bar as visible & In onPostExecuate() just make it invisible to that you are able to see the progress bar while video is streaming.

This is what I used to display progress bar in video view.

0

精彩评论

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

关注公众号