仿淘宝、京东商品详情页、视频悬浮效果、tab吸顶效果

本文介绍了如何在Android中仿制淘宝、京东商品详情页,包括视频和图片的横向Banner浏览,视频播放的全屏及悬浮效果,以及tab吸顶功能。使用了GSYVideoPlayer作为视频播放器,XPopup实现图片放大,并通过RecyclerView构建商品Banner效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这是仿照淘宝的商品浏览详情页,主要实现的效果有:

  • 视频和图片横向Banner浏览效果
  • 视频播放全屏和小窗悬浮效果
  • tab吸顶效果

这是效果实例图:
在这里插入图片描述

具体完整代码,可以下载链接: Demo工程.自行运行查看
布局文件:使用的是

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tl="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:background="#fff2f2f2"
    android:orientation="vertical"
    >
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    <com.example.tbaoproductdetaildemo.SuperSwipeRefreshLayout
        android:id="@+id/swipe_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:addStatesFromChildren="true"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">


            <androidx.coordinatorlayout.widget.CoordinatorLayout
                android:id="@+id/coordinator_layo
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值