To hell with adapters, with Smart Adapters

What I have dreaded for ages in Android was having to deal with Adapters in my ListViews. The code is always boring and pretty much the same all the time, and whenever it feels different, it means that the cells are getting too complicated... the adapter's LOC grow more and more, and it becomes unmanageable. RecyclerView doesn't help with that either.

Some time ago, back in Mobivery, we developed a tiny helper library that contained some solution around this: we would use a generic adapter for mapping some model classes to some view classes. It saved us many dev hours and proved very handy. And after I left, I developed my own take based on that principle and published it in nl-toolkit. I used it for a couple of my projects last year, and worked perfectly, so I took some time and rebuilt it with a nicer API and extracted it to a new library.

I called it Smart Adapters.

The concept is simple: we create all the interaction based code within custom view classes, inheriting from a class called BindableLayout<YourModelHere> and then we create the adapter, assign it to a ListView/RecyclerView and map the model


Today is my last day at Yahoo.

These months have been really fun; I've learned a lot and got to meet very cool people along the way! I wish you guys the best in your new adventures too!

I will throw some pictures for nostalgia's sake ­čśé

I will miss you too, little buddy

Former desk

The Wolf!

Localio enters 0.1.x family

I had to push a new update to Localio a few days ago, and it was one with breaking changes. The version number left the 0.0.x era, and now welcomes the 0.1.x family.

The offender was Google Drive: Google announced a while ago that its Documents List API was going to be deprecated in April 20th 2015. What that means for local is that the very handy login with login/pass will be no more, so things get a bit more complicated to set up. Now we have to use OAuth2 for this, therefore we need to deal with some other stuff that you will find familiar if you already worked with other Google APIs in the past.

I have written some basic instructions in the README file about how to set it up:

  1. You have to create a new project in Google Developers Console for using Drive API. You can do that here.
  2. After it is created you will be redirected to the credentials section (if not, just select under APIs and authentication in the sidebar the Credentials section), where you will click in the button labeled Create new client ID.
  3. Select the third option,