Compose is fundamentally different from XML layouts. Actually, Compose needs a different mental model. To get an idea about what I mean by a different mental model, I strongly recommend reading Thinking in Compose.
There are some fundamental concepts one needs to know in order to master Compose: recomposition, state, etc. In this post, we are going to talk about State by implementing a simple example through an iterative approach.
We are going to implement a counter using Compose. …
In this post, we’re going to use Ktor to implement a web service that when called, responds with “Hello, World”. In other words, we’re going to implement the so-called “Hello, World! program” using the Ktor framework to see how easy it is to get up and running with Ktor.
Based on ktor.io, Ktor is
an asynchronous framework for creating microservices, web applications, and more.
We’ll use Ktor to implement a super simple web service, but before that let's see why someone would use Ktor.
Ktor allows us to transparently configure only the functionality we need. No magic involved!
Have you ever tried to customize the appearance or behaviour of a
SearchView? Probably yes. Some customizations are pretty easy to do, but others are not that much straight forward. If you want to have full control, then writing a custom view to replace a
SearchView is one way to go. Writing such a view is not only educational but also fun!
Note: the custom view (from the hereafter
SearchEditText) we are going to write will not have all the options available by a
SearchView, but adding more options would not be difficult when you get the hang of it.
BottomNavigationView is one of the components available as part of the Material Design Components (MDC). As of version 1.3.0-alpha01 of MDC, BottomNavigationView supports a bunch of customizations like changing its background color, changing the color and size of its menu icons, etc. But one thing missing is changing its shape. It could be nice if we had the option to have a BottomNavigationView with rounded corners.
In this post, I’m going to talk about how to customize the shape of a BottomNavigationView but, before getting to that it’s good to know about
Some of the components of…
I, as an Android developer, have used BroadcastReceiver a million times. I thought I knew everything about it until someday there was a subtle bug regarding one of these BroadcastReceivers and so I read its official documentation from A to Z to sort out the bug.
What follows are some tips to keep in mind when using broadcasts and BroadcastReceivers.
Whenever we upgrade
targetSdkVersion we should always check to see if there are any changes regarding system broadcasts.
For instance, starting from Android 7.0 (API level 27) there are no more system broadcasts for
ACTION_NEW_VIDEO. Or starting from…