Android开源库相关

ButterKnife注解

网址https://github.com/JakeWharton/butterknife

注意:如果想要在lib/app中使用Butterknife库,则需要在当前module的build.gradle中添加compile信息;
如果你在lib库的build.gradle中引用了Butterknife的compile信息,
然后想要在app中直接使用Butterknife,这样的结果是注解失败;就会出现NullpointException;
https://www.google.com/search?q=NullPointerException+butterknife

AS插件:Android Butterknife Zelezny

  • 在使用的时候,注意,把光标放置在R.layout.layout_other上面,点击Alt+Insert,选择Generate ButterKnife Injections
  • 自定义live template模块:ButterKnife.findById –> fbi。(即按一下fbi,就显示出来ButterKnife.findById(, R.id.)

使用 ButterKnife 可能会让你的IDE编译速度变慢。

In the initial configuration incremental compilation takes 45s out of 1m 10s, but if Butterknife is removed then project is compiled in 15s only! Three times faster! Whole incremental build without Butterknife is 40s.
First and most important, the hypothesis was correct, modularizing project can significantly speed up build process, but not for all configurations.

Volley

步骤

  • 依据application上下文,初始化volley组件;
  • 配置参数和请求数据;
  • 添加到请求队列;
  • 结果处理;

注意

一般情况下,用get和post两种请求方式;
post请求使用:StringRequest对象;
get请求使用:JsonObjectRequest对象;

外部链接

Stetho - A debug bridge for Android applications

Stetho is a debug bridge for Android applications from Facebook that integrates with the Chrome desktop browser’s Developer Tools. With Stetho you can easily inspect your application, most notably the network traffic. It also allows you to easily inspect and edit SQLite databases and the shared preferences in your app. You should, however, make sure that Stetho is only enabled in the debug build and not in the release build variant.
https://github.com/futurice/android-best-practices#use-stetho

AndroidUtilCode

Android developers should collect the following utils

BaseMoudle

BaseMoudle是一个支持rxjava+retrofit2+mvp 同时支持mvc开发的一款框架

UltimateAndroidReference

Ultimate Android Reference - Your Road to Become a Better Android Developer (学习什么?这里清除了)

MultiType

Effective-MultiType

现在好了,我们有了 MultiType,简单来说,MultiType 就是一个多类型列表视图的中间分发框架,它能帮助你快速并且清晰地开发一些复杂的列表页面。 它本是为聊天页面开发的,聊天页面的消息类型也是有大量不同种类,且新增频繁,而 MultiType 能够轻松胜任。

注意

引入开源库的时候,注意要及时引入 proguard (以免忘记)