When it is necessary to implement a combo box in an Android app, most developers probably think it should be a piece of cake. Unfortunately, this is not the case, as with a lot of other issues we come across when implementing Android apps. In this article, I will show how to implement a custom Spinner with a Material theme. The result can look similar to this (depending on your styling, attributes, and item layout):
When developing Android apps sometimes there is a requirement that the system UI must be hidden and show app in fullscreen. A typical example is a camera app or barcode scanner. In this article I will show how to achieve this with the new WindowInset API, as well as the legacy View.systemUiVisibility so that the code works in Android 11 and is backward compatible with older versions.
Below, you can see an example of our camera screen which takes a photo for user’s avatar.
We want to hide the system bars when the Activity is shown. We will create a…