A new modern UI toolkit Jetpack Compose has been announced by Google over a year ago, and finally, it has been released 1.0 stable in July. Also many kinds of companies like Twitter, lyft, Square already have been adapted the Jetpack Compose in their production levels because it is very intuitive, powerful, and simplifies the entire UI structure if we use it well. This new paradigm of the UI structure will change a lot of things in our future, also we have to do more efforts to migrate the previous UI-related things like loading images from Url.
DataBinding is one of the most important factors for MVVM architecture. The basic concept of DataBinding is to link the view and view model via observer patterns, properties, event callbacks, etc. Linking and automating communication between the view via the bound properties or something in the view model has a lot of benefits in the MVVM architecture concept.
In modern Android development, constructing network structure is an important factor and we can implement network communication structure using HTTP client tools like OkHttp, Retrofit, or Volley. Also, it is an important factor to design how to handle callback responses from the network. Many people standardize callback responses by creating wrapper classes like
Response and handling success data or error messages depending on the response state like the below.
Hilt is a dependency injection tool that has been introduced by Google in the last year. Hilt makes our projects cleaner and reduces setup time for constructing our DI environment than Dagger-Android. It has been steadily getting feedback and developing for several months. Now Hilt is more stable than the earliest was. In this post, we will take a look at what is the main difference between the earliest version of Hilt and the newest one.
There is no difference in using
HiltAndroidApp annotation for building the base DI environment. The role…
Spinner is one of the most frequently used widgets in Android for selecting a specific item in a dropdown list. The Android SDK provides a default widget called Spinner, but as we know it requires many kinds of boilerplates and difficult to fully customize for our preferred design. And no animations. This requires our valuable time whenever we need to create a different type of spinners based on preferred designs. In this post, we will take a look at how to customize a better Spinner using a library, PowerSpinner.
The components of Android (Activity, Fragment, Service, BroadcastReceiver) are very independent of each other. It means they don’t have any dependencies on each other and it allows us to decide their entry points at any points. And we can decide and change their workflow by the desired anytime.
But the independent characteristics make it difficult to communicate with each other. So the Android SDK supports concepts of the Intent for holding an abstract description of an action to be performed, and the Bundle for passing data based on inter-process communication mechanism. They are one of the most important and basic…
Anew UI toolkit Jetpack Compose is announced by Google. Jetpack Compose is Android’s new modern toolkit for building native UI based declarative component approaches. In contrast to imperative programming, declarative programming is a programming paradigm that expresses the logic of computation or drawing UIs without describing its control flow. The declarative programming approaches in mobile are already used widely like SwiftUI and Flutter. And here is a new one; Jetpack Compose.
Application class is the first entry point of the android application process and it’s for maintaining a global application state. It is always running while our activities and services are running and also it is the first context to be created and the last to be destroyed. So it manages lifecycles of the whole applications using ApplicationContext, we can access the application’s resources, show toast messages, and create instances of Android SDK related classes that use it.
The other role of the Application class is initializing every SDKs and libraries which required ApplicationContext in the application’s whole lifecycle. As the…
Dagger is one of the most popular and most used libraries for building dependency injection, especially in Android. But the initial cost of learning is high and beginners are difficult to debug and hard to understand what’s going on in the compile time. So here is another powerful DI weapon for beginners and old dagger users: Hilt. In this post, we will look around what’s big differences between dagger-android and Hilt and what’s the benefits bu using Hilt.
The Hilt reached alpha but there is no official documentation and explains. so I’ve looked…
Progressbar is one of the most frequently used widgets in Android development. However as we know, the default ProgressBar provided by Android SDK has poor customizable options. There is no way to show the current progress value, no progress animations, no gradient/rounded basic attributes. Every time we should create a different drawable XML file, but it is still limited. This posting is about how to implement a polished and flexible ProgressView, fully customizable with animations and its UX design philosophy.
Generally, progressBar draws only progress. …