Coder Social home page Coder Social logo

glengithub / mdplayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dawish/mdplayer

0.0 1.0 0.0 19.12 MB

:fire: MDPlayer,Android万能播放器,支持视频大小窗口无缝切换,基于ijklayer+MVP+RxJava+Retrofit+Material Design开发。

Java 100.00%

mdplayer's Introduction

MDPlayer万能播放器

MDPlayer,基于ijkplayer+Rxjava+Rxandroid+Retrofit2.0+MVP+Material Design的android万能播放器,可以播放本地和在线视频,可以浏览宅男杀手妹纸图片,UI设计遵循 Material Design。

作者博客:http://blog.csdn.net/u010072711


MDPlayer 2.0最新GIF效果图:

Alt text

UI浏览:

Alt text Alt text Alt text Alt text Alt text Alt text Alt text Alt text

1.UI设计:

  • 列表使用RecyclerView,item为CardView并设置ripple波纹点击效果
  • viewpager指示器使用TabLayout
  • 侧滑栏使用NavigationView
  • 图片详情使用开源控件PhotoView,支持大缩小,旋转等等操作。
  • FloatingButton为开源控件FloatingActionMenu

2.App设计:

  • MVP架构,第一次真正使用MVP,真的使用了才会发现MVP的优势,MVP可以使Activity和Fragment非常简洁,Activity和Fragment中也不需要知道是怎么操作和流转的,我们只需要在回调接口中操作更新UI就可以了。
  • 所以得异步操作都使用Rxjava+Rxandroid,以前也是没用过,用过才发现、Rxjava是真的强大,Rxjava拥有非常丰富的操作符,我们灵活使用Rxjava可以创造无限可能,Rxjava就像搭建积木,Rxjava的操作符就行是积木块,使用Rxjava我们可以搭建出各种各种的积木,可以创造出很多可能,前提是你对Rxjava十分了解。
  • 网络请求采用retrofit2.0,retrofit2.0本身就很强大,配合、Rxjava后就更加强大了,retrofit2.0的使用我还没有更加深入的研究,日后再搞。
  • 离线缓存,离线缓存策略为,每次进入都是显示上一次的数据,本次的数据缓存下来,留着下一次显示,这样可以加快UI显示速度,可以离线使用App。
  • 图片加载使用picasso,picasso本身支持本地缓存。

3.知识点:

通过本app你可以学到:

  • ijkplayer-android 编译封装和集成
  • MVP架构,虽然我的这个app不是很复杂,但是大概的MVP是有的,首先我承认我的Model层写得不是很好。
  • 可以学习到Rxjava的使用,使用Rxjava递归读取内存所有的视频文件并分类,可以学习到justfromflatMapgroupByfilter等Rxjava操作符,相对别的app我用到的操作符相对还算多的。
  • 学习到retrofit2.0的使用,结合Rxjava做网络请求。
  • 离线缓存,可以学习到离线数据缓存策略,以及缓存工具的使用。
  • BaseActivityBaseFragmentBaseRecyclerViewAdapterBaseRecyclerViewHolder的封装。
  • Material Design和android5.0以后的新控件使用

4.依赖库:

    //FloatingActionMenu
    compile 'com.github.clans:fab:1.6.4'
    //retrofit
    compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
    compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
    compile 'com.squareup.retrofit:adapter-rxjava:2.0.0-beta2'
    //Rxjava + Rxandroid
    compile 'io.reactivex:rxandroid:1.2.0'
    compile 'io.reactivex:rxjava:1.1.5'
    //blurview
    compile 'com.eightbitlab:blurview:1.0.2'
    //photoview
    compile 'com.bm.photoview:library:1.4.0'
    //picasso
    compile 'com.squareup.picasso:picasso:2.5.2'
    //umeng
    compile 'com.umeng.analytics:analytics:latest.integration'

5.APK下载:

上架中...

6.知识点引导:

7.下版本改进

  • 下版本希望改进model层,对数据操作更加简洁
  • 增加视频播放历史记录
  • 自定义视频播控
  • 使用注解替代findViewById

mdplayer's People

Contributors

dawish avatar

Watchers

 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.