Mdplayer Universal player Mdplayer, based onijkplayer+Rxjava+Rxandroid+Retrofit2.0+MVP+Material DesignAndroid Universal player, can play local and online videos, can browse otaku killer sister paper pictures, UI design follows Material designs. GitHub Address: Https://github.com/Dawish/MDPlayer UI browsing:
1.UI Design:
- List use
RecyclerView , item is CardView and set ripple ripple Click Effect
- Viewpager indicator use
TabLayout
- Slide Bar Use
NavigationView
- Image details Use the open source control Photoview, which supports large zoom, rotate, and so on.
- Floatingbutton as an open source control
FloatingActionMenu
2.APP Design:
- For the
MVP architecture, the first real use of MVP, really used to find the advantage of MVP, MVP can make activity and fragment very concise, activity and fragment do not need to know how to operate and flow, We just need to manipulate the update UI in the callback interface.
- So the asynchronous operation is used
Rxjava+Rxandroid , before is useless, used to discover, Rxjava is really powerful, Rxjava has a very rich operator, we flexible use Rxjava can create infinite possibilities, rxjava like building blocks, Rxjava operator is a block of blocks, Using Rxjava we can build a variety of bricks, can create a lot of possibilities, if you are very understanding of Rxjava.
- Network request Adoption
retrofit2.0 , retrofit2.0 itself is very strong, with, Rxjava after more powerful, retrofit2.0 use I have not more in-depth research, later.
- Offline cache, the offline cache policy is that each entry is displayed last data, this time the data is cached, save the next display, this can speed up the display of the UI, you can use the app offline.
- Image loading
picasso is used, Picasso natively supports local caching.
3. Knowledge Points:
With this app you can learn:
- ijkplayer-Android compile encapsulation and integration
-MVP architecture, although my app is not very complicated, but the approximate MVP is there, first of all I admit that my model layer is not very well written.
-You can learn the use of Rxjava, using Rxjava recursive read memory all video files and classification, you can learn,,, and just from flatMap groupBy filter Other Rxjava operators, relative to other apps I use the operator relatively much.
-Learn to use retrofit2.0 and combine Rxjava to make network requests.
-Offline caching, you can learn the offline data caching strategy, as well as the use of caching tools.
- BaseActivity , BaseFragment ,, BaseRecyclerViewAdapter and BaseRecyclerViewHolder the package.
-Material design and android5.0 after new controls are used
4. Dependent libraries:
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 Download:
On the shelves ...
6. Knowledge Point guidance:
- Ijkplayer-android compiling in Ubuntu please read my article: http://blog.csdn.net/u010072711/article/details/51438871
- Rxjava Introductory guide See: http://blog.csdn.net/u010072711/article/details/51590553
- Android Mvp+retrofit+rxjava Practice Summary: http://wuxiaolong.me/2016/06/12/mvpRetrofitRxjava/
7. Next version improvements
- The next version wants to improve the model layer and make the data operation more concise
- Increase video playback history
- Custom Video Broadcast control
- Using annotations instead of Findviewbyid
Android Ijkplayer+rxjava+rxandroid+retrofit2.0+mvp+material Design-based Android Universal player AAA