我在YouTubePlayerView中有查看问题。它不是水平全屏显示。在左侧和右侧有两个垂直的黑条。你可以在附图中看到。我怎样才能移除这些条?
<com.ecomapps.tubeplay.widget.AspectRatioView
android:id="@+id/ignored_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:aspectRatio="1.90">
<com.google.android.youtube.player.YouTubePlayerView
android:id="@+id/youtube_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true" />
</com.ecomapps.tubeplay.widget.AspectRatioView>

发布于 2017-01-19 22:11:44
删除com.ecomapps.tubeplay.widget.AspectRatioView
发布于 2020-09-14 23:41:23
当我声明时,它可以工作
layout_height="wrap_content".
<com.google.android.youtube.player.YouTubePlayerView
android:id="@+id/youtube_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>尝尝这个。
https://stackoverflow.com/questions/41743769
复制相似问题