All Projects → zion223 → Neteasecloudmusic Mvvm

zion223 / Neteasecloudmusic Mvvm

Jetpack MVVM最佳实践 - 重构仿网易云音乐安卓客户端

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Neteasecloudmusic Mvvm

Rxlifecycle
Rx binding of stock Android Activities & Fragment Lifecycle, avoiding memory leak
Stars: ✭ 131 (+27.18%)
Mutual labels:  lifecycle, fragment
RxHttp
RxJava2+Retrofit+OkHttp3
Stars: ✭ 13 (-87.38%)
Mutual labels:  okhttp3, lifecycle
Androidbaseframemvvm
Android 组件化 MVVM 框架 基于 Jetpack + Kotlin
Stars: ✭ 169 (+64.08%)
Mutual labels:  lifecycle, okhttp3
Sbplayerclient
支持全格式的mac版视频播放器
Stars: ✭ 110 (+6.8%)
Mutual labels:  music-player, video-player
vcplayerbot
Play songs directly in telegram voice chats.
Stars: ✭ 48 (-53.4%)
Mutual labels:  music-player, video-player
musicWebTemplate
Free website template built for musicians / artists to promote their music and connect to their audience.
Stars: ✭ 26 (-74.76%)
Mutual labels:  music-player, video-player
RxComponentLifecycle
Rx binding of new Android Architecture Component Lifecycle
Stars: ✭ 57 (-44.66%)
Mutual labels:  fragment, lifecycle
angular-youtube-player
Simple youtube player created with angular and typescript. See demo.
Stars: ✭ 35 (-66.02%)
Mutual labels:  music-player, video-player
deplayer
Decentralized mediaplayer which runs entirely in the browser.
Stars: ✭ 14 (-86.41%)
Mutual labels:  music-player, video-player
Vudit
A file viewer for Android
Stars: ✭ 40 (-61.17%)
Mutual labels:  music-player, video-player
Abmediaview
Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.
Stars: ✭ 79 (-23.3%)
Mutual labels:  music-player, video-player
Mvvmarms
Android MVVM Architecture Components based on MVPArms and Android Architecture Components.
Stars: ✭ 425 (+312.62%)
Mutual labels:  lifecycle, okhttp3
Ngx Youtube Player
YouTube player app built with Angular 7
Stars: ✭ 92 (-10.68%)
Mutual labels:  music-player, video-player
Okhttps
如艺术一般优雅,像 1、2、3 一样简单,前后端通用,轻量却强大的 HTTP 客户端(同时支持 WebSocket 与 Stomp 协议)
Stars: ✭ 92 (-10.68%)
Mutual labels:  okhttp3
Avideo
Create Your Own Broadcast Network With AVideo Platform Open-Source. OAVP OVP
Stars: ✭ 1,329 (+1190.29%)
Mutual labels:  video-player
Videolistplayer
Play video in ListView or RecyclerView
Stars: ✭ 1,308 (+1169.9%)
Mutual labels:  video-player
Ytmdesktop
A Desktop App for YouTube Music
Stars: ✭ 1,297 (+1159.22%)
Mutual labels:  music-player
React Video Renderer
Build custom video players effortless
Stars: ✭ 100 (-2.91%)
Mutual labels:  video-player
Plug
macOS app for Hype Machine
Stars: ✭ 93 (-9.71%)
Mutual labels:  music-player
Lazybones
😴 A super lazy and fluent Kotlin expressions for initializing lifecycle-aware property.
Stars: ✭ 91 (-11.65%)
Mutual labels:  lifecycle

仿网易云客户端V6.0 MVVM版本

根据开源项目Jetpack-MVVM-Best-Practice架构重构之前使用MVC架构的项目, 原项目的地址
PS.如果编译时提示找不到BR类,把 C:\Users\User\AndroidStudio4.0\config 路径下的studio64.exe.vmoptions文件加上-Dfile.encoding=UTF-8 然后重启AndroidStudio就Ok.

对Jetpack架构的思考

  1. layout.xml文件复用问题,layout文件中引入变量,尽可能的抽取出公共的变量才能复用布局文件,若引入ViewModel则尽可能引入CommomViewModel否则会导致语义不清晰。
  2. BindingAdapter中绑定方法调用,若两次变量相同则不会被调用,绑定刷新状态方法若两次刷新状态都是True则第二次不会响应,需考虑其他方法(new Object(state))。
  3. 需要绑定生命周期的方法调用时不太优雅(调用时需要与View绑定)、使用动画时需要持有对View的引用。
  4. 尽可能避免在layout文件中写逻辑操作。

Room持久化存储框架的思考

  1. 保存单一数据不如SharePreference方便(如登陆时间、用户信息)。
  2. Dao与实体类绑定,单一实体类只能作为一张表,若存在需保存相同实体类的数据不方便,例如AudioBean,既需要在保存音乐播放列表时使用也需要在保存到最近播放的歌曲时使用。目前的解决方法是用一个相同的类代替,有无更好的方法??
  3. Room在操作数据库时需要重新开线程访问,那么在无法开线程访问的情况下使用Room不方便(目前解决方法是在构件时调用allowMainThreadQueries())。
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].