开发者

Is there a way to make a custom VideoView progress bar without building a MediaPlayer from scratch?

开发者 https://www.devze.com 2023-04-11 17:27 出处:网络
I am currently making an Android app and I\'m going to need to make a custom video player. I just need to change its ProgressBar color. Is there a simple way to do that?

I am currently making an Android app and I'm going to need to make a custom video player. I just need to change its ProgressBar color. Is there a simple way to do that?

I know I could do that using Commonsguy example. But it's not 开发者_JAVA技巧so good as the native video player and I think it would be making a lot for only a change of color.

Any help appreciated!


I ended up building a media player from scratch based on Commonsguy example. I've tried to use Android source code for a few classes. MediaController looks exactly like what I needed to customize but it uses to many internal resources that we don't have access to.


The native video player will be intrinxically linked to the system theme so changing the color is not possible.

You could try extendingthe native player and using it as a custom activity in your project, you might then be able to change the theme via your manifest.xml or in code.

0

精彩评论

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

关注公众号