布局文件如下:

<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="match_parent" android:layout_height="match_parent">    <zippler.cn.yuewu.component.FullVideoView        android:background="#00ffffff"        android:layout_width="match_parent"        android:layout_height="match_parent"        android:alpha="0"        android:id="@+id/videoView"      />    <ImageView        android:translationZ="10dp"        android:id="@+id/img"        android:layout_width="match_parent"        android:layout_height="match_parent"        android:scaleType="fitXY"        android:contentDescription="@string/preloadVideoFrame"        android:layout_alignParentTop="true"        android:layout_alignParentStart="true" />RelativeLayout>

重点在于VideoView中需要设置background: android:background=”#00ffffff”,透明显示底部的ImageView
为了更好的用户体验,可以在onScrollStateChanged监听器case 0 中添加:

     recyclerView.postDelayed(new Runnable() {                    @Override                    public void run() {                            ImageView img =mv.getImageView();                            img.setVisibility(View.INVISIBLE);                }                },500);

更多相关文章

  1. adroid 现行布局水平居中位置
  2. Android百分比布局
  3. 完美解决Android Studio在写XML布局的时候没有了控件代码提示的
  4. Android 子控件高度超出父布局的限制
  5. android开发 使用uses-sdk 导致布局不一样解决
  6. android studio无法在可视化页面预览布局文件
  7. Android五大UI布局的特有属性
  8. 33、Android 中子fragment控制父对象改变布局
  9. 探索Android ConstraintLayout布局

随机推荐

  1. 如何解决Dynamics 365的错误:用户身份验证
  2. 在 996 这事上,搜狗 CEO 王小川“人设崩塌
  3. Get-CrmSetting返回Unable to connect to
  4. 将Dynamics 365中的用户及其角色、角色导
  5. 与大家分享一下,在workerman开发中遇到的
  6. 一种提升连接Dynamics 365性能的方法
  7. 阿里一面:CyclicBarrier和CountDownLatch
  8. Spark + ElasticSearch 构建电商用户标签
  9. Kafka多维度系统精讲,从入门到熟练掌握
  10. 深入了解Serializable接口