Migration from synthetic binding

Oh how I loved kotlin-android-extensions and synthetic binding when it came out! I bet you liked that too. Unfortunately after some time android world realised, that this solution is not as perfect as we initially though and we need to migrate to jetpack view binding, or some other solution of your choice. While I was… Czytaj dalej Migration from synthetic binding

Opublikowano
Umieszczono w kategoriach: Uncategorized

Room database migrations

If you need to migrate you Room database, just follow this article:https://rahul9650ray.medium.com/room-db-migrations-in-android-cb165954ee6d

Plant a tree with Timber logs

If you want to log something in your debug app, and you for sure want, then you most probably heard about Timber library. It’s one of the most popular Android libraries, simple to use, but quite powerful. This is how you can make a basic setup, to logs messages only in debug build:

Gradient background for a view

If you still haven’t switch to Jetpack Compose, and you create your layout in XMLs you may wonder, how to create great looking gradient background for a View. Here’s the quick guide. Create new xml file under your drawables, like my_gradient_background.xml. It has to have few proprieties like: Play around to see what effect you… Czytaj dalej Gradient background for a view

Recognise if the device use HMS

If you are the unlucky one who need to handle new Huawei devices at your work or/and for your application, then you probably know, that HMS stands for Huawei Mobile Services (and GMS for Google Mobile Services). Sooner or later, you will want to recognise, what services are running on your user’s device. To do… Czytaj dalej Recognise if the device use HMS

Style your TextView with HTML tags

If you ever wondered if you can style your text with HTML tags – you absolutely can. For most cases it is enough to use Html.fromHtml or you can use it directly in your string resources. Here are the most used tags: Bold: <b>, <em> Italic: <i>, <cite>, <dfn> 25% increase in text size <big> 20% decrease in text size <small> Setting… Czytaj dalej Style your TextView with HTML tags