Android 仿朋友圈,文字图片视频多条目,自动播放暂停

因为太长了不能把项目搬过来,记一下关键点

多条目都会,然而这里因为微信朋友圈界面的特殊,他有一个头部,开始我是做的ScrollView+RecyclerView,后来发现在Scrollview 的包裹下Rv 的监听方法中,findFirstVisbility等方法会失效。然后我做了很多实现,修改这个bug,或者AddHeader ,或者换成Coordinatorlayout 包裹,然而都不行...这个效果是我做成 首条目的

class PyqActivity : BaseActivity() {


    var videoPath0 = "/storage/emulated/0/DCIM/pipixia/a27f31bdfe904d15b4f3975c9383cc92.mp4"
    var videoPath1 = "/storage/emulated/0/DCIM/pipixia/eeca379a7a4d4a43a36814aedfeeaed1.mp4"
    var videoPath2 = "/storage/emulated/0/DCIM/pipixia/2a8278c10f67403aac86e4bcd0127b86.mp4"
    var videoPath3 = "/storage/emulated/0/DCIM/pipixia/cb63468ec1ad4135ae22373eceec752a.mp4"

    var ivPath0 =
        "https://gimg2.baidu.com/image_search/src=https%3A%2F%2Fptop.only.wip.la%3A443%2Fhttp%2Fimg1.baidu.com%2Fit%2Fu%3D3788606852%2C2363382091%26fm%3D253%26app%3D120%26f%3DJPEG%3Fw%3D800%26h%3D800&refer=https%3A%2F%2Fptop.only.wip.la%3A443%2Fhttp%2Fimg1.baidu.com&app=2002&size=w300&q=a80&n=0&g=0n&fmt=jpeg?sec=1645345036&t=d497feeccc5d8a98a3e6ff2c0214af85"
    var ivPath1 =
        "https://gimg2.baidu.com/image_search/src=https%3A%2F%2Fptop.only.wip.la%3A443%2Fhttp%2Fimg2.baidu.com%2Fit%2Fu%3D3062469291%2C1117322059%26fm%3D253%26app%3D120%26f%3DJPEG%3Fw%3D1200%26h%3D800&refer=https%3A%2F%2Fptop.only.wip.la%3A443%2Fhttp%2Fimg2.baidu.com&app=2002&size=w300&q=a80&n=0&g=0n&fmt=jpeg?sec=1645345036&t=c03a8b3d3bc5d372ff695169101987d3"
    var ivPath2 =
        "https://gimg2.baidu.com/image_search/src=https%3A%2F%2Fptop.only.wip.la%3A443%2Fhttp%2Fimg1.baidu.com%2Fit%2Fu%3D1207938889%2C442335491%26fm%3D253%26app%3D120%26f%3DPNG%3Fw%3D800%26h%3D800&refer=https%3A%2F%2Fptop.only.wip.la%3A443%2Fhttp%2Fimg1.baidu.com&app=2002&size=w300&q=a80&n=0&g=0n&fmt=jpeg?sec=1645345036&t=850b667097c1766508f1b9ca72451c0e"
    var ivPath3 =
        "https://gimg2.baidu.com/image_search/src=https%3A%2F%2Fptop.only.wip.la%3A443%2Fhttp%2Fimg2.baidu.com%2Fit%2Fu%3D98371021%2C1121096365
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值