如何解决recyclerview 中的水平 youtube 播放列表,如 Youtube kids App
我正在尝试在 android 应用程序中以水平/横向格式显示 youtube 播放列表,就像 youtube kids 应用程序的工作方式。这是xml代码
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Spinner
android:id="@+id/youtube_playlist_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"/>
<horizontalscrollview
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/youtube_playlist_spinner">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/youtube_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" />
</LinearLayout>
</horizontalscrollview>
但到目前为止,我没有任何运气。播放列表继续以垂直格式显示,但如果我旋转手机,应用程序会因“Youtube 播放列表停止”而崩溃。任何帮助,将不胜感激。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。