【Android】第三方技术前沿开源项目

2017-02-10  本文已影响0人  Wavky

Dagger、Dagger2、ButterKnife

依赖注入

Flux、MVP、MVVM、DataBinding

项目架构模式

EventBus、RxBus

异步事件总线通讯库

RxJava、RxAndroid

响应式编程模型库,解决多线程多重异步操作产生的回调地狱难题,针对Android可根据生命周期安全地维护、终止异步线程的执行

FlexboxLayout、ConstraintLayout、PercentRelativeLayout、PercentFrameLayout

新型布局排版。
FlexboxLayout 是源于 CSS 的流式布局,类似于增强型 Linearlayout,并支持多行多列排版。
ConstraintLayout 是基于约束机制的增强型 RelativeLayout,可产生扁平化的 Layout 结构树,由 Support 包提供。
PercentRelativeLayout 与 PercentFrameLayout 属于 Percent Support Library,提供以百分比划分空间的布局类,支持子控件在宽高以及margin上使用百分比数字进行约束:

compile 'com.android.support:percent:22.2.0'

<android.support.percent.PercentFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <TextView
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_heightPercent="20%"
        app:layout_widthPercent="30%"/>
...

Google 开源的 Android 排版库:FlexboxLayout
探索约束布局(ConstraintLayout)的概念与使用

AutoValue

Java 代码编译期自动生成库

RecyclerView、FastAdapter

RecyclerView 用于替代 ListView 和 GridView 的适配器控件,需要与LayoutManager配合控制内容排版,内置的三种布局管理器如下:

* LinearLayoutManager 水平、垂直布局
* GridLayoutManager 网格
* StaggeredGridLayoutManager 瀑布流式

使用的 Adapter 需要继承自 `RecyclerView.Adapter<ViewHolder>`
ViewHolder 集成自 `RecyclerView.ViewHolder`

FastAdapter 用于快速构造动态复杂的 Adapter,适用于 RecyclerView

OrmLite、GreenDao

OrmLite 基于 Java 反射,运行期动态映射数据库表
GreenDao 属于编译期生成数据库映射代码

上一篇下一篇

猜你喜欢

热点阅读