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.

Read More »

Android tricks – How to find view’s dimensions before displaying the view?

Two days ago I had to work with some views (Surprise! Surprise!). At some point I had to get the actual views’ width and height, before actually displaying the views. Of course, they were included in my XML layout. Thus this made the task a little bit easier. After spending several minutes on Google (ALWAYS do that, when you are in trouble), I found a solution.

Read More »

Geo-fencing with MVP Part 3

With the previous two posts, we went through the basic concepts behind the idea of geofencing, why using design patterns and we dived deeper in the main components used in the construction of the example application for these series. Now in the third part, we will go through the classes which are responsible for the core geofencing functionality. I hope you still remember the overall MVP design diagram from the previous post! The one down below seems similar to the previous one, but some additional components are included as well:

Read More »

Android tricks – How to add an icon to your Toolbar?

Today I had to implement something which is not so popular throughout the Android universe. I had to implement a simple Toolbar with a logo on it’s left side. That’s not so popular these days, but from time to time there always will be someone who wants something like that. All in all, the end result had to be similar to the one down below:

toolbar_icon
Toolbar with icon

Read More »

Geo-fencing with MVP Part 2

In the previous post, we talked about the idea behind geo-fencing, why is it so useful and what is the reason behind choosing a particular design pattern like MVP. It was most like an introductory step before getting our hands dirty with some actual source code. Thus, in this part of the series, I will try to go through the different layers of the MVP pattern and will try to explain as much as possible the things that are happening there.

Read More »

Android tricks – How to prevent AlertDialog from dismissing after onClick event?

Have you noticed that the default behavior of AlertDialog is to disappear after onClick event? I’m sure you have! But there are cases when we actually don’t want to dismiss the dialog. In these situation, the default behavior of the AlertDialog must be overridden. Down below you will find a snippet which is doing exactly that thing.

Read More »

Geo-fencing with MVP Part 1

Several weeks ago, I had to implement a geo-fencing functionality in one of the projects on which I was currently working on. Due to the fact that I had never done that before, I had to do a ‘small’ research on the topic. Of course, tools like Google, Stackoverflow, the Android Documentation, etc. were there to help me. Happily, I managed to inform myself on the topic, but there was a small detail. I failed to find a good example of how to implement all the logic by using the MVP design pattern. So, that is how my journey began and step by step it led me to write these several articles.Read More »