Simple Trick to Make Multi-color Gradient Background using XML in Android

Multi Color Gradient Background using XML in Android

By default, XML in Android only supports gradient backgrounds with up to 3 colors. However, there is a workaround to create multi-gradient effects. This article will show you how to do it. We’ll create the following background: There are four colors in the gradient: First, create 3 drawable resource files for the gradient background: gradient_background1: … Read more

Notification Styles in Android (with Examples)

Jetpack Compose Notification Styles Android

In this article, we’ll learn how to implement the different notification styles in Android. Prerequisites: We’ll look at the following styles: First, create an Android Studio project. Add a class called MyNotifications and paste the following code. It contains all the necessary methods to create and post the notification. Next, in the Manifest file, add … Read more

Tab Layout in Material 3 Jetpack Compose (with Examples)

Jetpack Compose Material 3 Tab Layout

In this article, we’ll learn how to implement the tab layout (tab row) in Material 3 Jetpack Compose. Prerequisites: What is a Tab Layout? Tab Layout is used to organize and present content in a structured and user-friendly manner. It consists of a series of tabs. Each tab typically represents a distinct category or function … Read more

Swipe to Delete in Jetpack Compose LazyColumn (with Examples)

Jetpack Compose LazyColumn Swipe

In this article, we’ll learn how to implement the swipe to delete action in Jetpack Compose LazyColumn. Prerequisites: We’ll create the following output: First, create an empty Compose project and open MainActivity. Create a Composable called MyUI() and call it from the onCreate(). We’ll write our code in it. MainActivity for the Material 3 Jetpack … Read more

How to Post Notifications in Android?

Android Post Notifications

In this article, we’ll learn how to post notifications in Android with the help of an example. Prerequisites: In Android, we can post notifications in 4 simple steps: Let’s start coding. It is a good practice to keep all the notification-related methods in one class. So, create a MyNotifications class and add the following code: … Read more

Dropdown Menu in Material 3 Jetpack Compose (with Examples)

Jetpack Compose Dropdown Menu Material 3

In this article, we’ll learn how to implement the dropdown menu APIs in Material 3 Jetpack Compose. Prerequisites: What is a Dropdown Menu? It is used to display a list of choices, similar to a pop-up menu. There are two dropdown menu APIs: 1. Dropdown Menu: This is a normal menu. Example: 2. Exposed Dropdown … Read more

Jetpack Compose Expandable Card Animation with Icon

Jetpack Compose Expandable Card Animation

In this article, we’ll learn how to implement expandable card animation in Jetpack Compose. Our final output looks like this: Let’s start coding. First, create an empty Compose project and open MainActivity. Create a Composable called MyUI() and call it from the onCreate(). We’ll write our code in it. MainActivity for Material 3 Jetpack Compose: … Read more

LazyColumn Animations in Jetpack Compose (with Examples)

Jetpack Compose LazyColumn Animations

In this article, we’ll learn how to add animations to the LazyColumn in Jetpack Compose with examples. Prerequisites: For the purpose of this article, we’ll animate the items while performing the following operations: First, create an empty Compose project and open MainActivity. Create a Composable called MyUI() and call it from the onCreate(). We’ll write … Read more

Notification Basics in Android (with Examples)

Android Notification Basics

In this article, we’ll learn notification basics in Android. We look at the frequently used terms and notification anatomy. What are Notifications in Android? A notification is a message that Android displays outside your app’s UI. Users can tap the notification to open your app or take an action directly from the notification. Example: There … Read more

How to Implement the Nested Navigation in Jetpack Compose?

Jetpack Compose Nested Navigation

In this article, we’ll learn how to implement the nested navigation in Jetpack Compose with the help of an example. Prerequisites: What is Nested Navigation? Nested Navigation helps us to organize and structure the app’s navigation hierarchy. Using it, we can add a navigation graph inside another navigation graph. For example, imagine we have four … Read more