Decorator pattern and an Android use case

Decorator pattern is a structural design pattern that allows us to dinamically add responsibilities to concrete objects, by using composition: that is to say, this pattern decorates objects to give them more behaviour than what they have when they are created and each decorator adds its own behaviour and responsibilities, fitting this in the Single Responsibility Principle. This pattern offers a more flexible alternative to extend behaviour than inheritance.

Best way to know if your Android app is currently in foreground

Recently, I had to develop a new feature in the app which shows different UI depending whether the app is shown or not. In this post, we will go through different options, from most common, wrong and overused way to the best solution.

About Java Collections framework interfaces...

The Collections framework in Java is an esential part of the Java platform used to manage groups of elements of the same type and it is also something that all Java developers should master. During last days, I have been reading about this framework and taking some important basic notes I want to present you in this post. Let’s go!