How to Implement Checkbox in Jetpack Compose?

Jetpack Compose Checkbox

In this article, we will learn how to implement Checkbox and TriStateCheckbox APIs in Jetpack Compose. Prerequisites: What is Checkbox in Android Jetpack Compose? A checkbox helps the user to select an item. Checkboxes can turn an option on or off. Example: For this article, open MainActivity, create a MyUI() composable and call it from … Read more

Jetpack Compose Slider (with Examples)

Jetpack Compose Slider

In this article, we will learn how to implement Slider and RangeSlider APIs in Jetpack Compose with examples. Prerequisites: What is a Slider in Jetpack Compose? Sliders allow users to make selections from a range of values. They are ideal for adjusting settings such as volume and brightness, or for applying image filters. Example: Slider … Read more

Jetpack Compose Text (with Examples)

Jetpack compose text

Today, we will learn how to work with text in Android Jetpack Compose with the help of examples. Prerequisites: How to Display Text in Jetpack Compose? We use the Text() composable to display any text. It provides a lot of customizations out of the box. If you know XML, this is the TextView. For this … Read more

Jetpack Compose Switch Button (with Examples)

Jetpack Compose Switch Button

In this article, we will explore Switch Button in Jetpack Compose with the help of examples. Prerequisites: What is Switch in Android Jetpack Compose? The switch (or switch button) represents two states – on and off. When we tap on it, it toggles the state. We mostly use the switch in the app’s settings screen. … Read more

3 Awesome Jetpack Compose Custom Switch Buttons

custom switch jetpack compose

I have made some custom switch buttons using the Jetpack Compose APIs. I hope you guys like them. Switch with Icon: It is made with Box() API. It shows the Done icon when the state is ON and the Close icon when it is OFF. Source Code: Switch with Icon Custom Switch 2: It is … Read more

Jetpack Compose Card (with Examples)

Jetpack Compose Card

In this article, we will learn how to implement Card in Android Jetpack Compose along with examples. If you are familiar with XML, this is CardView. Prerequisites: What is Card in Jetpack Compose? Cards are surfaces that display content and actions. We can set the shadow, border, and corner radius to make it more appealing. … Read more

Jetpack Compose 1.3.1 Gradle Files

build.gradle (project level): build.gradle (app level):

Understanding Themes in Jetpack Compose

Jetpack Compose Theme

In this article, we will explore themes in Android Jetpack Compose and how to use colors, shapes, and typography with examples. What is a Jetpack Compose Theme? Themes provide a consistent look and feel to your app. They contain things like color and typography. By default, Jetpack Compose follows material guidelines. So, all the composables … Read more

How to Add Custom Fonts in Android Studio?

Custom Fonts in Android Studio

It’s easy to add custom fonts in the Android Studio project. First, visit the Google Fonts website to download fonts. For this article, I’m using Poppins font. Next, open Android Studio, right-click on the res folder, and select New > Android Resource Directory. From the “Resource type” menu, select font and click on the OK … Read more

Jetpack Compose BasicTextField (with Examples)

Jetpack Compose BasicTextField

In this article, we will explore BasicTextField in Jetpack Compose with examples. Prerequisites: What is BasicTextField in Jetpack Compose? BasicTextField helps us to create a fully customized input field. Unlike, TextFiled, it has no decorations. If you want to create an input field without following material guidelines, basic text field is the right choice for … Read more