Compiling AOSP for your Nexus device on Mac OSX


8GB of RAM, recommended 16GB
100 gb of free space on your drive

Preparing the environment

First we need a case-sensistive file system, so we need to create a sparseimage because by default the OSX system is not case-sensitive

hdiutil create -type SPARSE -fs ‘Case-sensitive Journaled HFS+’ -size 60g ~/android.dmg

If we want to resize this image later we can …


City mapper coloured tabs and coordinator layout

City Mapper is one of the most known transport apps out there, personally I find it the best by far. Lately, they’ve changed their UI/UX which I find particularly useful and beautiful.

One of the widgets I like the most on the app are the coloured tabs, especially the colour changing progressively while you swipe …


Retain & restore recycler view scroll position

If you come to a¬†situation where you need to retain the scroll position of a recycler view (i.e. configuration change,¬†going back on a certain flow), you might think that you have a retain and restore the scroll manually. Yes, in fact, you have to, but LayoutManager has a convenient API that makes things a bit …

Android / Architecture

Clean Contacts injectors are now proguard friendly

One of the awesome proguard features is the ability to strip the non-used code that you are packaging to the final apk, is really a nice feature because it removes a lot of size of our final apks and also strips the method number for the dex count (remember the 65k dex method limit)

The problem …

Android / Development

Create a mapper easily

If you are used to implement clean architecture in your project you will know that the mappers are a very boring part to write. The mappers are needed to send data across boundaries and you need to be careful while you are writing it, because if you forget to map any field the data will …


Playing with the new support TabLayout

Today I had to implement the new TabLayout from the support library and this is my Tips&Tricks to implement the tabs in a painless way.

The default tab indicator is so thin and can’t be appreciated it if the background is similar to the indicator. The first thing to change is the tab indicator height by …


Some fixes to the injectors

I made some fixes to the injectors to make the use more flexible than the first version.

The first improvement is in the output injector, when I created it, I don’t had in mind to have two in the same presenter and this is a really common thing, so I fixed it.

The other fixes and improvements …

Android / Architecture

New implementation of Interactor Invoker

The interactors are the part of the business logic that follows the command pattern, one example implementation in Java is, for example, the ThreadPoolExecutor and the Runnables. The ThreadPoolExecutor is the invoker that executes the runnable (command). When we are using Interactors in our clean approach we are following the command pattern, so I’ve wrapped …

Android / Architecture

New weapons against the bus

Hi, today I gave a talk in Droidcon Spain about Clean architecture, quite similar to the Salamanca but with some fixes and improvements over this implementation. Now I don’t use a bus for this architecture anymore and I reduced the boilerplate.

New implementation of Interactor Invoker

The new implementation of the invoker is based on Futures and …

Android / Architecture

Clean Android without bus

A lot of people are wondering why use a bus in my Clean Android implementation (Clean-Contacts repo on GitHub). And the reply is simple: I need to to get the reply of a previously launched interactor in a new instance of a presenter because on a rotation change the presenter is destroyed also the view, …