Reduce boilerplate code

Instead of checking which version of Android the user have on code, use
XML themes and set the right theme depending of Android version.