协调者布局 及m3u8 视频格式 播放 仿 快手 详情页

m3u8格式 视频播放

implementation 'com.shuyu:GSYVideoPlayer:7.1.6'// 视频播放器
 implementation 'com.android.support:design:30.0.0'  //协调者布局
// XML
    <com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
                    android:id="@+id/play"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    />
// 这样就可以播放啦  记得加网络权限
   play = (StandardGSYVideoPlayer) findViewById(R.id.play);
        play.setUp("https://txmov2.a.yximgs.com/upic/2020/11/12/18/BMjAyMDExMTIxODA2NTBfMjUyMDg5MDg5XzM5MTA4MTEzMjYwXzFfMw==_b_B349b0c56632f063aeb72d151a3f5505c.mp4", true, "");
        play.startPlayLogic();

协调者布局

在这里插入图片描述

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".view.Main2Activity">

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.google.android.material.appbar.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">


            <com.google.android.material.appbar.CollapsingToolbarLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:minHeight="300dp"
                app:layout_scrollFlags="scroll|exitUntilCollapsed">

                <com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
                    android:id="@+id/play"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    app:layout_collapseMode="parallax" />

            </com.google.android.material.appbar.CollapsingToolbarLayout>
        </com.google.android.material.appbar.AppBarLayout>

        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="1000dp"
                    android:gravity="center"
                    android:text="爱了" />
            </LinearLayout>
        </androidx.core.widget.NestedScrollView>
    </androidx.coordinatorlayout.widget.CoordinatorLayout>


</RelativeLayout>



    
 


协调者布局不太明白可以看这位大神的.
链接: https://blog.csdn.net/u012124438/article/details/56701641
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值