Giter Site home page Giter Site logo

lxlfpeng / android-references Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shouheng88/android-references

0.0 0.0 0.0 15.37 MB

👏 Android 示例程序:MVP, MVVM, 组件化, AndroidX, ARouter, RxJava, EventBus, ButterKnife, 视频播放, 视频直播, 网络访问, 布局和控件整理等

Java 100.00%

android-references's Introduction

Awesome Android

该项主要用来收集和整理开发过程中经常用到的三方库和控件,并包含一些演示代码。[可以参考下文来了解更多的内容]

代码清单

1、整体结构

/-----
     /----- advanced           IPC, AIDL
     /----- animations         CircularReveal, TapTargetView, Ripple, etc
     /----- client             整体 APP 打包
     /----- commons            公共库
     /----- eyepetizer         开眼视频, MVP
     /----- guokr              果壳新闻
     /----- knife-annotations  ButterKnife 注解
     /----- knife-api          ButterKnife API
     /----- knife-compiler     ButterKnife 编译器
     /----- layout             MaterialDesign
     /----- libraries          指纹识别, EventBus, WorkManager, Knife etc
     /----- live               全民直播

注:各个模块借助 ARouter 实现了模块化开发,可以通过修改 gradle.properties 中的属性来实现各个模块独立打包

2、视频直播

对应于 live 模块,该模块主要用来演示视频直播相关的功能:

基于《全民直播》的 API 设计的在线视频直播功能;使用了支持包里的 Palette 来提取图片的颜色;MVVM 架构设计 (在该项目中的使用不符合规范,谨慎参考);使用了pldroid-player作为视频播放的工具。

部分截图:

3、果壳新闻

对应于 guokr 模块,该模块主要用来演示OkHttp + Retrofit + RexJava的开发方式:

基于《果壳网》 API 设计的新闻客户端,包含基本的"列表-详情"结构;MVVM 架构设计 (在该项目中的使用不符合规范,谨慎参考)。

4、开眼视频

对应于 eyepetizer 模块,该模块主要用来演示小视频类型的 APP 相关的功能,同时演示 MVP 架构模式在 Android 端的使用方式:

MVP 架构设计;基于《开眼视频》的 API 设计视频浏览客户端。

注:项目比较小,功能比较少,主要用来演示核心的网络视频播放功能。

5、MaterialDesign

对应于 layout 模块,该模块主要用来整理 MaterialDesign 相关的布局和控件,目前包含的布局有:

NavigationTabbedBottom sheetScrollingCollapseSupport 28 中的部分控件。

6、其他

  1. 自定义类似于 ButterKnife 的库,文件路径包含 knife-annotationknife-apiknife-compiler

    该部分内容需要使用 Java 中的注解以及注解处理,你可以通过这篇文章来了解这部分功能如何实现:《Java 注解及其在 Android 中的应用》

  2. 使用 RxJava2 搭建一个 EventBus,文件路径在 rxbus

    该部分使用 RxJava2 实现一个类似于 EventBus 的全局通信的框架,相关的知识可以通过这篇文章进行了解:《RxJava2 系列 (3):使用 Subject》

  3. 在该项目中使用了 MVPMVVM 两种架构设计方式,同时使用了 ARouter 来实现了模块化开发,你可以通过这篇文章来了解相关的知识:《Android 架构设计:MVC、MVP、MVVM和组件化》

  4. 如果你希望了解 OkHttp 的源码相关的知识,请参考我的这篇文章:《Andriod 网络框架 OkHttp 源码解析》

  5. 如果你希望了解 Retrofit 的源码相关的知识,其中使用了哪些设计模式等等,请参考我的这篇文章:《Android 网络框架 Retrofit 源码解析》

android-references's People

Contributors

shouheng88 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.