Zhumulangma

Project Url: TanZhiL/Zhumulangma
Introduction: 高仿喜马拉雅 Android 客户端,单 activity 多 fragme 组件化架构,欢迎 star,不喜勿喷😜
More: Author   ReportBugs   
Tags:

### 注意:请将 lib_common 下 manifest 中喜马拉雅 key 替换为自己的,不然会提示访问超过限制.

本项目仅提供学习参考,不可作为商用.

新增传统 AMS 页面管理,参考 develop_ams 分支

更新日志:

珠穆朗玛 FM 1.0 2020-12.7
  • 通过后台动态配置首页 tab 栏
珠穆朗玛 FM 1.0 2020-11.19
  • 新增传统 ams 页面管理,参考 develop_ams 分支
珠穆朗玛 FM 1.0 2019-11.22
  • 适配 AndroidX
    珠穆朗玛 FM 1.0 2019-10.31
  • 使用 BackgroundLibrary 库代替所有 shape 资源,请无视 xml 文件中 app:bl_xxxx_xxxx="xxxx"错误
  • 引入 databinding,减少 findViewById 使用
    珠穆朗玛 FM 1.0 2019-10.22
  • 用户登陆
    珠穆朗玛 FM 1.0 2019-10.09
  • 友盟分享
    珠穆朗玛 FM 1.0 2019-09.25
  • 布局优化,避免过渡绘制
  • 完善状态管理,提升用户体验
    珠穆朗玛 FM 1.0 2019-09.20
  • 声音批量下载
  • 语音搜索
  • 专辑订阅
  • 声音喜欢
  • 优化启动速度
  • 加入模拟广告页
  • 集成 Bugly 异常上报,全量更新,热更新
    珠穆朗玛 FM 1.0 2019-09.13
  • 第一次发布

功能演示

在这里插入图片描述 在这里插入图片描述 在这里插入图片描述

主要功能(包括不仅限于):

  • 专辑展示
  • 声音展示及播放
  • 电台展示及播放
  • 主播展示
  • 声音下载
  • 历史播放展示及播放

    待完善(包括不仅限于):

  • 优化 UI
  • 优化性能
  • 修复 bug

快速体验

扫描二维码下载:

如果二维码图片不可见,点我下载体验密码 1111

项目架构

本项目采用 retrofit+rxjava2+rxandroid+arouter+mvvm+fragmentation 实现单 activity 多 fragme 组件化架构

  • app:负责管理各个业务组件,和打包 apk,没有具体的业务功能;
  • lib_third:负责第三方库的集成和初始化;
  • lib_common:属于功能组件,支撑业务组件的基础,提供多数业务组件需要的功能;
  • module_main:属于业务组件,指定 APP 启动页面、主界面;
  • module_home:首页展示,包括热门,分类,精品,主播,电台,展示及播放等;
  • module_listen:我听,包括订阅,喜欢,播放历史,下载等;
  • module_discover:发现,包括后续扩展功能等;
  • module_user:用户管理模块;

组件化实现:

珠穆朗玛 FM 客户端使用阿里 ARouter 作为路由,实现组件与组件的通信跳转

集成模式和组件模式转换

Module 的属性是在每个组件的 build.gradle 文件中配置的,当我们在组件模式开发时,业务组件应处于 application 属性,这时的业务组件就是一个 Android App,可以独立开发和调试;而当我们转换到集成模式开发时,业务组件应该处于 library 属性,这样才能被我们的“app 壳工程”所依赖,组成一个具有完整功能的 APP

先打开工程的根目录下找到 gradle.properties 文件,然后将 isModule 改为你需要的开发模式(true/false), 然后点击 "Sync Project" 按钮同步项目

isModule=false

在这里插入图片描述

if (isModule.toBoolean()) {
    apply plugin: 'com.android.application'
} else {
    apply plugin: 'com.android.library'
}

在这里插入图片描述

组件之间 AndroidManifest 合并问题

我们可以为组件开发模式下的业务组件再创建一个 AndroidManifest.xml,然后根据 isModule 指定 AndroidManifest.xml 的文件路径,让业务组件在集成模式和组件模式下使用不同的 AndroidManifest.xml,这样表单冲突的问题就可以规避了 已 module_main 组件为例配置如下: 在这里插入图片描述

sourceSets {
        main {
            if (isModule.toBoolean()) {
                manifest.srcFile 'src/main/module/AndroidManifest.xml'
            } else {
                manifest.srcFile 'src/main/AndroidManifest.xml'
            }
        }
}

组件模式下的 Application

在每个组件的 debug 目录下创建一个 Application 并在 module 下的 AndroidManifest.xml 进行配置 配图: 在这里插入图片描述

集成开发模式下的 Application

在这里插入图片描述

主要用到的开源库

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ```

Apps
About Me
GitHub: Trinea
Facebook: Dev Tools