Tag: Material Design

Android Makers 2017

Last month I was in Paris for the 1st edition of Android Makers, a brand new conference about mobile apps. Organized by the same guys who made the Droidcon Paris, it was two amazing days of talks about Android, with speakers from all around the world.

I was lucky enough to do a talk about mobile app design, and all the though situations you can meet when you’re creating an app for someone else. Here’s the video (in French):



You can also read the slides on Slideshare (even if it might not be really complete without the stories told in the talk):


And to show you how cool was Android Makers, here’s my top 3 from the conference:



The Fabulous Journey to Material Design Award by Taylor Ling

In this talk, Taylor Ling explained us the key principles he used to design Fabulous, an extraordinary app that won a Material Design award last year. Probably one of the best talk I’ve seen in years.



The ART of organizing resources by Jeroen Mols

Here Jeroen Mols explains us the conventions he uses to name his resources. We were nicely surprised to see that we were basically doing the same things at iD.apps. So we’re probably doing it the right way :).



Android Things for IoT by Wayne Piekarski

Wayne Piekarski from Google was here to show us some of the cool stuff you can do with Android Things. Honestly, watch the talk. Now I want to IOT all the things!


In the end it was a great event. I can’t wait to come back next year!



Share Button

True Colours, or the quest of comparing two colors


I’ve started a few months ago to work on an application called Eternal Minis. It’s a social network where warmongers can share their painted miniatures. If you don’t understand what I’m talking about, check out Wikipedia.

Anyway, the app allows users to add paints they’ve used to a posted minis. It’s a very interesting information if you want to learn how someone has painted a specific color effect. However, it can be a bit tedious to add all the colors you’ve used, especially when there are dozens of them! My idea was to help the user by suggesting the first color. Maybe it’d help him start, and he’ll keep adding other paints after that.


Color distance

My first idea was to vectorize the RGB components of a color picked on the photo (using Palette), and then make a distance calculation between this color and the predefined paints included in the app. Even if it may sound like a good idea, a short distance between RGB components might not be really relevant.

So I started to search for some actual color comparison algorithms. What I found is that you can calculate an Euclidian distance between two colors, from actually any format. So you can do the following with RGB components.

An Euclidian formula with 3 dimensions, courtesy of Wikipedia
An Euclidian formula with 3 dimensions, courtesy of Wikipedia


However, RGB components, even if they’re great for computers, may not be very relevant for how humans perceive colors. Actually, if you take a look at the Wikipedia article on Color difference, you can read about the work of International Commission on Illumination (CIE). the CIE76 formula for color distance looks like this:

Looks familiar, right?
Looks familiar, right?

You’ll notice that the color components are called L, a and b. It’s because the CIE colors are defined with the Lab color space, which is trying to approximate how humans perceive colors.

So we can easily convert RGB colors to the Lab space, and then use the Euclidian distance to find a relevant color from a mini picture!


Make the robots working!

As an Android developer, the good news is: Google has already made all the heavy stuff. The ColorUtils class has a method RGBToLAB (which returns an array with Lab components), and a distanceEuclidian method has well.

So, all you have to do is to pick a color using Palette, and make the comparison with ColorUtils.

What I actually do in Eternal Minis is loop over all vibrant colors in all swatches, and then keep the color with the lowest distance to any paint color included in the app. Then I suggest the user to add the found paint. And here’s the result:

Final result
The final result


So what’s next?

The approximation works fairly well, but there are a lot of things to consider outside the color comparison. Photos are often taken with a white or black background, so you don’t want to suggest this color to your user for example. So there is still a lot of work to ease the life of painters!

Share Button

Google I/O: I was here

Even if I haven’t posted about it (except if you follow me on Twitter), I was at Google I/O this year, thanks to my company. And it was awesome, as you can expect. I’ve met a lot of people, see some great conferences, and I’ve came back with tons of new ideas.

I’m especially pleased with their work on Firebase (except for this annoying push notification bug). And I really want to try Google Home (who wouldn’t?).

Here is the top 5 of the conferences I’ve seen. Enjoy!

You also have to see this one. It’s not your usual I/O conference. You’ll thank me 🙂

Share Button

Building the astonishing: useful Android libraries for developers

When you’re developing an Android app, you can of course build everything from scratch, or use some of the thousands available open-source libraries. It’ll save you a lot of time, and often let you use complex UI animations, components, or algorithms, which you wouldn’t be able to code from scratch (or not without a lot of time). I even know some people who’d like to use nothing but libraries to build their app.

Since I’ve used a lot of libraries for Astonishing Comic Reader, I’ve decided to write this article, and talk about some of the most useful ones.


Support libraries

First of all, I’d like to quickly talk about support libraries. There are a lot of them out there, and even if new releases often come with bugs (especially Appcompat, or the brand new design support library), you have to use (some of) them. Even if you don’t require an API level 4 support, the support v4 library contains very useful stuff like fragments or retro-compatible animations. Just take a look at the revisions list.



Android annotations

Android annotations (AA) is one of my favorite Android libraries since I’ve started to develop on this platform. It simplifies your code by generating a lot of boilerplate code, like views injection, background threads, intents building, custom views, preferences, Rest API calls… Well, it does it almost all. Just take a look at the official cookbook, you’ll see what I mean.

AA actually generates subclasses from annotations, where all the code you don’t want to write is. For example, if you want to use AA on a specific activity class called MyActivity, you’re using annotations like @EActivity (to declare that your class will use AA annotations) and @ViewById (to avoid the boring findViewById). At compilation, a class called MyActivity_ (notice the “_” symbol) is generated. This is this class that you’ll declare in your manifest, and use to build intents.

AA really makes your life easier, on a lot of things. Maybe too much things, and that’s one of its flaws. It quickly creates a very strong dependency between your code and the library, and removing it might be a pain. But if you want to replace all these features with other libraries, you can start with things like Dagger and Butterknife.

The other major flaw is that it creates a lot of new subclasses (actually, one per annotated classes). Then, it almost doubles the number of methods in your code, which might dramatically lead you to the unpopular multidex error. Keep it in mind if you want to use it.


Square one

Square is an American company specialized in mobile payments. But their talented developers have developed some of the most popular Android libraries, including Otto, Dagger, Retrofit, Picasso… I’ll talk about some of them here, but you can check the complete list here.



Otto is an event bus library. Basically, it allows you to send messages across the different components of your application. And trust me, that’s sometimes very, very useful. You can for example send objects from a fragment to another or notify an activity from a custom view. It’s not a must-have in all your projects, and you should be careful about overusing it.

In ACR, I use Otto to synchronize the zoom level between the pager’s page, or to notify the view that suggestions have been loaded. You can also use it to send events about network operations, or database data retrieving.

There is a very good alternative to Otto called EventBus. I’m not very fond of it, but it has some very convenient features, like managing events trough inheritance, which Otto doesn’t.



Retrofit is a REST client library for Android which clearly eases your work with web services.

The only things you have to do is to declare an interface, containing all your API endpoints (annotated with things like @GET or @Query), and use this interface to declare a RestAdapter and a service class, which is basically your interface implementation.

What I like with Retrofit is that it’s very, very easy to use, and it’ll clearly change your life. It allows you to simply declare your endpoints, or customize them with annotations. It automatically parses you results using Gson, but you can use a custom converter if you want (XML parser for example). Easy setup, great default behaviour, and advanced customization if needed. What else?



I’ll probably write another article about image libraries, since image processing is at the core of ACR, but I got to talk about Picasso. Yes, it’s another library by Square, designed to ease image downloading and manipulation. The goal is to let developers easily display images from the Internet, and automatically handle things like cache, network failures, placeholders etc.

I’ve seen on a Google + poll that a lot of developers don’t use any library to manage images. If you don’t, do it. Right now.  Even if you’ve your own library for that. If you don’t want Picasso, you can pick something like Universal Image Loader, Glide or even Fresco. Each of these libraries have been developed, tested and improved by thousands of fellow developers. And they clearly ease your life!


JSON processing

JSON processing is nowadays a very easy task in most cases. You probably all know Gson, the Google library to parse JSON. There are alternatives like Jackson, or the new player in town: Moshi (also by Square).


Finding new libraries

Finding new Android libraries is easy: just use Google. But if you want to do it the right way, there are a lot of websites out there which are referencing new libraries each day. My favorite one is Android arsenal, but you can also visit AndroidLibs or directly test libraries on your mobile with Libraries for developers.


Share Button

Holo to material design – Devoxx France 2015

I was this week at Devoxx France. Apart of the amazing conferences, I was myself doing an updated talk about Material Design. Since the Droidcon Paris (where I first did this presentation), a lot of libraries have been created to achieve various parts of the design specifications, and many apps have adopted this new approach.

I’ll update this article when the video will be available on Parleys. You can however get the slides on Slideshare:



Share Button