android 优秀框架整理(1)

本文列举了多个优秀的Android框架,包括Android-PullToRefresh、flexbox-layout、AndroidSwipeLayout、realm-java、greenDAO、stetho、BaseRecyclerViewAdapterHelper等,涵盖了滑动刷新、布局管理、数据库、调试、适配器等多个方面。每个框架都有其独特功能和应用场景,如 Realm 提供高性能数据库,Stetho 提供便捷的Chrome调试工具,帮助开发者提高开发效率和应用体验。
摘要由CSDN通过智能技术生成

github https://github.com/chrisbanes/Android-PullToRefresh

作者:Chris Banes

使用:

github fork源码,集成到项目中

25.flexbox-layout

一句话介绍:一款弹性伸缩布局

上榜理由:8.1k个star,前端H5开发者转Android开发的福音,FlexboxLayout作为LinearLayout和RelativeLayout的替代者,值得各位一试,与其一同推出的还有ConstraintLayout。

github https://github.com/google/flexbox-layout

作者:Google

使用:

dependencies {

compile ‘com.google.android:flexbox:0.3.0-alpha3’

}

26.AndroidSwipeLayout

一句话介绍:非常强大滑动式布局

上榜理由:滑动删除是国产app常见需求,商品详情的上下滑动需求作为开发者的我们也经常遇到,AndroidSwipeLayout在github上拥有8K个star,证明它经受住了检验,各位值得一试

github https://github.com/daimajia/AndroidSwipeLayout

作者:daimajia

使用:

dependencies {

compile ‘com.android.support:recyclerview-v7:21.0.0’

compile ‘com.android.support:support-v4:20.+’

compile “com.daimajia.swipelayout:library:1.2.0@aar”

}

27.realm-java

一句话介绍:Realm是一款移动端数据库框架

上榜理由:核心数据引擎C++打造,比普通的Sqlite型数据库快的多。笔者猜测正是如此,realm以7892个star数让它位于大名鼎鼎的数据库框架GreenDao(7877)之前

官网地址:https://realm.io/cn/

github https://github.com/realm/realm-java

作者:Realm团队

使用:https://realm.io/docs/java/latest/

28.greenDAO

一句话介绍:greenDAO是一款高效、快速的SQLite型数据库

上榜理由:greenDAO的star数量与 Realm不相上下,且与EventBus师出同门,也是由greenrobot团队开发维护的,质量有所保证,但若拷问笔者Realm与 greenDao两者的优劣性,只能具体到实际使用当中,模拟线上的使用情形,进行高强度测试后才能下判断,故在此不能一言两语说完,深表遗憾

官网地址:http://greenrobot.org/greendao/

github https://github.com/greenrobot/greenDAO

使用:

复制代码

buildscript {

repositories {

jcenter()

mavenCentral() // add repository

}

dependencies {

classpath ‘com.android.tools.build:gradle:2.3.1’

classpath ‘org.greenrobot:greendao-gradle-plugin:3.2.2’ // add plugin

}

}


apply plugin: ‘com.android.application’

apply plugin: ‘org.greenrobot.greendao’ // apply plugin

dependencies {

compile ‘org.greenrobot:greendao:3.2.2’ // add library

}

29.stetho

一句话介绍:一款提供在Chrome开发者工具上调试Android app能力的开源框架

上榜理由:上古时期Android程序员要调 试本地数据库,需要进入Android Device Monitor找到/data/data/com.xxx.xxx/databases里面的db文件,导出到PC端,用PC的数据工具查看,现在使用 stetho省却了如此的麻烦;如今的Android程序员如果想调试网络请求响应过程中的报文段,需要在请求中加入Log语句,一个信息一个信息打印出 来,相当繁琐,现在请使用stetho,省却诸如此类的麻烦把!7.8K个star数,广大Android开发者调试的福音,你值得拥有!

作者:FaceBook

官网地址: http://facebook.github.io/stetho/

github https://github.com/facebook/stetho

使用:

compile ‘com.facebook.stetho:stetho:1.5.0’

30.BaseRecyclerViewAdapterHelper

一句话介绍:强大、流畅的Recyvlerview通用适配器

上榜理由:如果你是RecyclerView的拥簇者,你一定要体验这款专门服务该view的适配器,7.7K个star,让这个家伙位于github上Android 适配器排行榜第一,还有很多惊喜等你去探寻!

官网地址:http://www.recyclerview.org/

作者:陈宇明以及他的小伙伴

使用:

allprojects {

repositories {

maven { url “https://jitpack.io” }

}

}

dependencies {

compile ‘com.github.CymChad:BaseRecyclerViewAdapterHelper:VERSION_CODE’

}

31.AndroidViewAnimations

一句话介绍:一款提供可爱动画集合的框架

上榜理由:正如作者所说,它囊括了开发需求过 程中所有的动画效果,集成进了这个简洁可爱的动画框架。7.6K的star数,证明了它在动画框架领域的战斗力,让它仅仅位列lottie- android和Material-Animations两个动画框架霸主之后,屈居第三名

github https://github.com/daimajia/AndroidViewAnimations

作者:daimajia

使用:

dependencies {

compile ‘com.android.support:support-compat:25.1.1’

compile ‘com.daimajia.easing:library:2.0@aar’

compile ‘com.daimajia.androidanimations:library:2.2@aar’

}

sample:

YoYo.with(Techniques.Tada)

.duration(700)

.repeat(5)

.playOn(findViewById(R.id.edit_area));

32. MaterialDrawer

一句话介绍:强大的塑料风格的抽屉框架

上榜理由:7.6K的star数量,作者的持续更新状态,如果你还在犹豫上手SlidingMenu遇到bug没人管的困境,那么你可以入手它作为你的抽屉布局

github https://github.com/mikepenz/MaterialDrawer

作者:Mike Penz

使用:

compile(‘com.mikepenz:materialdrawer:5.9.2@aar’) {

transitive = true

}

new DrawerBuilder().withActivity(this).build();

33.Android-ObservableScrollView

一句话介绍:一款让视图滑动更具有视觉效果的滑动式框架

上榜理由:7.5K的star数量,证明了它曾经的价值,github上提供了12种滑动效果,你可以用它弥补其他框架的不足,提升你的App体验!

github https://github.com/ksoichiro/Android-ObservableScrollView

作者:Soichiro Kashima

使用:

compile com.github.ksoichiro:android-observablescrollview

34.CircleImageView

一句话介绍:圆角ImageView

上榜理由:也许你已经听说过无数种展示圆角图片的方法,但如果你不尝试尝试CircleImageView,那么你的知识库会因为少了它黯然失色,有的时候完成需求是开发者优先考虑的,不同实现方法牵扯到的性能差异更值得让人深思,如果你有心在图片性能上有所涉猎,那么CircleImageView绝对不会让你败兴而归。最后别忘了记得去看Romain Guy的建议哟。

github https://github.com/hdodenhof/CircleImageView

作者:Henning Dodenhof

使用:

dependencies {

compile ‘de.hdodenhof:circleimageview:2.1.0’

}

<de.hdodenhof.circleimageview.CircleImageView

xmlns:app=“http://schemas.android.com/apk/res-auto”

android:id=“@+id/profile_image”

android:layout_width=“96dp”

android:layout_height=“96dp”

android:src=“@drawable/profile”

app:civ_border_width=“2dp”

app:civ_border_color=“#FF000000”/>

35.logger

一句话介绍:一款让log日志优雅显示的框架

上榜理由:logger作为调试框架,并未给 出很强大的能力,它最大的亮点是优雅的输出log信息,并且支持多种格式:线程、Json、Xml、List、Map等,如果你整日沉迷于汪洋大海般的 log信息不能自拔,logger就是你的指路明灯!6.6k个star让他位列调试框架第二名,屈居facebook的stetho之后

github https://github.com/orhanobut/logger

作者:Orhan Obut

使用:

compile ‘com.orhanobut:logger:2.1.1’

Logger.d(MAP);

Logger.d(SET);

Logger.d(LIST);

Logger.d(ARRAY);

Logger.json(JSON_CONTENT);

Logger.xml(XML_CONTENT);

36.agera

一句话介绍:一款服务于Android平台的响应式编程框架

上榜理由:google专门推出一套响应式编 程框架服务于Android开发者,相比于之响应式编程框架榜首的 RxJava RxAndroid,它更轻量,两者最大的不同点在于agera基于push event、pull data (VS Rx系列 push data)。

github https://github.com/google/agera

作者:Google

使用:

compile ‘com.google.android.agera:agera:1.3.0’

扩展能力

compile ‘com.google.android.agera:content:1.3.0’

compile ‘com.google.android.agera:database:1.3.0’

compile ‘com.google.android.agera:net:1.3.0’

compile ‘com.google.android.agera:rvadapter:1.3.0’

compile ‘com.google.android.agera:rvdatabinding:1.3.0’

37.BottmBar

一句话介绍:一款底部导航栏视图框架

上榜理由:底部栏里的王者框架,6.3K的 star数量,证明了它的优秀,完全遵循材料设计规范,上手非常方便。如果说缺点,无法设置icon与titile的间距,无法自定义视图的大小等,但这 些都可以通过修改源代码解决,笔者献丑也修改了一套符合国内开发者的底部导航框架,即将开源。

github https://github.com/roughike/BottomBar

作者:Iiro Krankka

使用:

compile ‘com.roughike:bottom-bar:2.3.1’

38.Calligraphy

一句话介绍:一款自定义字体框架

上榜理由:如果你还在为一键修改App内所有字体样式而烦恼,6.3K个star的Calligraphy就值得你拥有,它可以同时修改整个整个项目的Textview字体,也可以单独 设置某个Textview的字体,还在等什么,快来试试吧!

github

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值