Android tricks - How to make the text of a RadioButton appear on it's left side?

Let’s start 2017 with a quick and useful ‘How to’ article! Have you ever tried to make the text of a RadioButton appear on it’s left side? It’s tricky! You can check to source code down below: Code description By default, for the usual left-to-right layout, the text appears on the right side of the RadioButton. As you can see from the snipped above, we actually use a particular property to change the direction of the current view:...

January 24, 2017 · 2 min · Todor Kostov

Android tricks - Determine current screen density

Do you know the thing I hate the most about Android? It’s screen fragmentation! On the one hand, having a huge variety of screen sizes is great for the end users. But it’s a complete nightmare for developers! Thus, it’s really hard to create a good looking UI without any problems. There will always be a device with some wired screen size on which your layout will look bad! There are several different approaches for handling this problem....

January 19, 2017 · 2 min · Todor Kostov

DiffUtil in details

The chances of developing a medium to large size Android application without using RecyclerView are relatively low. The scrollable list, as UI and UX pattern, is really powerful. It gives us the possibility to group similar items or entities into lists. They are easy to grab and to understand. But there are some difficulties related to this pattern as well. We often have to update those lists with some newly entered, or server-fetched information....

January 15, 2017 · 4 min · Todor Kostov

Intent VS PendingIntent

2016 is officially over and here we are at the beginning of 2017! So let’s start the year with some wisdom! Have you ever wondered what is the difference between Intent and PendingIntent? Well, although they sound similar, there is a difference between them. As you can see, the documentation about these two entities is extensive and provides lots of information. But we will try to summarize it in a shorter version....

January 8, 2017 · 3 min · Todor Kostov

Geo-fencing with MVP Part 4

Here we are, at the last, fourth part of the series about Geofencing and MVP. In this last article we will talk about the actual registration and addition process of the predefined POJO geofences. Aaand we will make a short summery of the articles up till now. In part 3 we said that there are two different groups of entities in the manager package. The first group is responsible for providing the location awareness logic for our app, and the second is responsible for handling the actual geofencing functionality....

December 26, 2016 · 5 min · Todor Kostov