我使用YouTube Android Player API在Android活动中播放视频。这是我使用位于YouTubePlayerSupportFragment
方法中的onCreate
播放视频的代码:
YouTubePlayerSupportFragment youtubeFragment = (YouTubePlayerSupportFragment) getSupportFragmentManager().findFragmentById(R.id.youtubeFragment);
youtubeFragment.initialize(youtubeApiKey, new YouTubePlayer.OnInitializedListener() {
@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider,
YouTubePlayer youTubePlayer, boolean b) {
youTubePlayer.cueVideo(videoId);
}
@Override
public void onInitializationFailure(YouTubePlayer.Provider provider,
YouTubeInitializationResult youTubeInitializationResult) {
}
});
这是声明片段的XML:
<fragment
android:id="@+id/youtubeFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.google.android.youtube.player.YouTubePlayerSupportFragment" />
目前,当视频加载青色时会显示圆形progressBar。是否可以更改此progressBar的颜色以及如何进行此操作?
我想将颜色更改为当前主题的colorAccent。
由于