android周报148期

本期周报发布于 2015 年4月12日 

源地址:http://androidweekly.net/issues/issue-148

How to install different app variants on one Android device(blog.grandcentrix.net)

可以从这篇文章中学会如何在一个安卓设备上安装一个app的多个版本。

Pseudolocalization: Visiting Android's Bizarro World(blog.danlew.net)

自上次Dan Lew那篇关于pseudolocalization之后发生了很大的变化,这里可以看到现在它是多么简单。

Dagger 2 + Espresso 2 + Mockito(blog.sqisland.com)

Chiu-Ki Chan分享了使用Dagger 2, Espresso 2 和 Mockito来测试的demo。

Announcing Anko for Android (and Kotlin)(blog.jetbrains.com)

jetbrains公布了一个他们一直在开发的一个Kotlin的安卓库。允许用DSL来实现类型安全与动态的方式创建用户界面。

安卓中的Model-View-Presenter模式介绍(konmik.github.io)

这是一篇安卓中MVP模式的详细教程,从最简单的例子到最佳实践。本文还介绍了一个让在安卓中使用MVP模式变得非常简单的library。

译文地址: http://jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0425/2782.html 

Activity, 线程, 以及内存泄漏(www.androiddesignpatterns.com)

做 Android 开发最常遇到的问题就是在 Activity 的生命周期中协调耗时任务,避免执行任务导致不易察觉的内存泄漏。这篇文章将让你识别这种情况并学会如何避免。

译文地址: https://github.com/bboyfeiyu/android-tech-frontier/tree/master/issue-7/%E5%9C%A8Activity%E4%B8%AD%E4%BD%BF%E7%94%A8Thread%E5%AF%BC%E8%87%B4%E7%9A%84%E5%86%85%E5%AD%98%E6%B3%84%E6%BC%8F 

Triumph! Android Studio 1.2 Sneaks In Full Testing Support(www.bignerdranch.com)

Android Studio 1.2的beta版本使用Robolectric作为单元测试的解决方案,你不再需要第三方的方案,这篇文章演示了它是多么方便。

Kotlin for Android (III) 扩展函数与默认值(antonioleiva.com)

在这篇文章中,你将学会Kotlin的扩展函数功能

Against Android Unit Tests(philosophicalhacker.com)

Matt Dupree launches a series of articles on reframing the approach to automated testing of Android apps.

Matt Dupree开始写

Retrofit 安卓教程(themakeinfo.com)

使用Retrofit为你的REST API开发一个安卓客户端的小教程。

在安卓上尝试Dagger 2(fernandocejas.com)

Fernando Cejas深入讲解为什么依赖注入是一种很重要的模式,以及为什么Dagger 2要优于它的前任。