Giter Site home page Giter Site logo

sinxiao / recylerviewmultiheaderview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mengzhidaren/recylerviewmultiheaderview

0.0 2.0 0.0 83.21 MB

解决webView滑动冲突,支持与WebView,VideoView(miniVideo), HeaderView 嵌套使用

Java 100.00%

recylerviewmultiheaderview's Introduction


本库是基于RecyclerViewHeader的扩展。 ###RecyclerView头View的ViewGroup,支持与WebView,Video,View 嵌套使用

特性

  1. webView完美嵌入RecyclerView
  2. RecyclerView和webView之间滑动惯性传递
  3. 滑动RecyclerView中视频切换为mini小屏
  4. 优化过渡绘制卡顿的问题

截图

HeaderVideo HeaderView

HeaderWebView

引入

  • Gradle
implementation 'com.yyl.multiview:recyclerview-multiheaderview:1.1.3'

开发

在xml中引用RecyclerViewMultiHeader(参考demo)

    <com.yyl.multiview.RecyclerViewMultiHeader
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:viewState="video"  
            app:videoScale="0.5625">//video 9/16
....
        </com.yyl.multiview.RecyclerViewMultiHeader>
    
viewState
  <attr name="videoScale" format="float" />//显示比例
<attr name="viewState">
     <enum name="video" value="0" />//按videoScale比例 显示headView    在全屏后自动撑满全屏
     <enum name="view_header" value="1" />//以childView最大高度为最终高度
     <enum name="web" value="2" />//childView为全屏  其中setRequestFullWeb(false)会在webView内容不足一屏时 不填充整个VIEW
     <enum name="view_header_top" value="3" />//以最顶层childView高度为最终高度
</attr>
// 设置视频监听。
    //视频小窗口开关
   public void setScreenSmallDisable(boolean stateVideoSmallDisable)
    //视频小窗口监听
   public void setOnVideoSmallCallBack(OnVideoSmallCallBack onVideoSmallCallBack)

    //取消关联
    detach() 

参考代码

本库的是以RecyclerViewHeader为基础在功能上做的扩展,感谢作者开源库。

License

MIT License.

recylerviewmultiheaderview's People

Contributors

mengzhidaren avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.