Pitfalls of building a brilliant app

Hand holding phone
Hand holding phone
Photo by Masakaze Kawakami on Unsplash.

1. Things Should Be Where They’re Supposed to Be (Strings, Colors)

There is tremendous growth in the Android ecosystem around the globe with a diverse community. People from different backgrounds, people with disabilities, people who wish to have fancy features like night mode, and more use Android apps in their day-to-day life.

Developing apps for such a diverse community is not an easy task. I’m not speaking about high-level architectures here. In contrast, it’s about simple things like strings, colors, dimens, etc. that will considerably affect modern Android development.

People usually feel comfortable using an application in their native language. The vital step is to maintain all the strings in a…


Multiple view types in RecyclerViews using sealed classes

Phone placed vertically
Phone placed vertically
Photo by Stephen Frank on Unsplash.

One of the best ways to display huge lists in Android is through RecyclerView. As developers, you all might have used it. We have many advanced features like view holder patterns, rich animation, Diff-Utils callback to improve performance, etc. Apps like WhatsApp and Gmail use RecyclerView to show endless conversations.

One of the significant RecyclerView features that I use is view types. We can display multiple view types in the same RecyclerView. …


Forward and backward Android navigation with communication

Man typing on laptop
Man typing on laptop
Photo by Bench Accounting on Unsplash.

In this article, you’ll learn how to pass data between Fragments in both forward and backward navigation. You’ll learn about the navArgs concept and how to use LiveData with a key in the Navigation component.

Prerequisites

This article about how to pass data between destinations using the Jetpack Navigation component, so basic knowledge of the Navigation component and how to use it is required. If you’re new to the Navigation component, please check out the following links:

Overview

Navigation between screens is one of the fundamental features of any…


Kotlin, and Coroutines

Photo by Headway on Unsplash

Android is one of the leading platforms in mobile development. If you want to reach millions of potential users, defiantly android would be at the top of your list. With this increasing hype, many software engineers choosing android development as their carrier choice.

Android interviews are a mix of many concepts like android basic to advanced concepts, Kotlin, coroutines, RxJava, Architectures, Design patterns, solid principles, and more. It’s highly impossible to include all of them in a single article. Following are the links to all the parts of this series, feel free checkout them.


No more adapters to display large Android lists. Use LazyColumn and LazyRow

Dog wearing glasses looking at tablet screen
Dog wearing glasses looking at tablet screen
Photo by Cookie the Pom on Unsplash.

In this article, we’re going to learn how to display large datasets in Jetpack Compose. We’re going to cover horizontal and vertical lists. Along with that, you’ll learn how to implement sticky headers and multiple view types.

Introduction

Jetpack Compose is one of the recent attempts from Google to make it easy for Android developers to build UI.

“Jetpack Compose is a modern toolkit for building native Android UI. Jetpack Compose simplifies and accelerates UI development on Android with less code, powerful tools, and intuitive Kotlin APIs.” — Android Developers

Jetpack Compose recently moved to beta. This means there will no…


Learn how to use LiveData, observeAsState, and MutableState in Compose

Photo by Gert Boers on Unsplash.

In this article, we’re going to learn what state is and how it works in Jetpack Compose. While doing so, we’re going to learn some fancy things like remember, LiveData with observeAsState, and Compose-specific MutableState concepts.

Note: Jetpack Compose recently moved to Beta. This means there will no longer be any drastic changes in the API structure. So it would be a great time to learn how to work with the next-generation UI kit for Android development. Widgets in Jetpack Compose are reactive to states, so enjoy the article.

You need to install Android Studio Canary, Arctic Fox (2020.3.1)


Dagger2, Proguard, Threads, Architecture and Security

Photo by Headway on Unsplash

Android is one of the leading platforms in mobile development. If you want to reach millions of potential users, defiantly android would be at the top of your list. With this increasing hype, many software engineers choosing android development as their carrier choice.

I’m an android developer for more than five years now, and I’ve been on both sides of the table when it comes to android interviews. So I decided to write a series of articles about android interview Q&A.

Android interviews are a mix of many concepts like android basic to advanced concepts, Kotlin, coroutines, RxJava, Architectures, Design…


Photo by Zan on Unsplash

To show alerts like snackbar or dialog is a common task in the modern android application. In this article, you’re going to learn everything about how to display snackbar and alert dialog in Jetpack Compose.

Note: Jetpack Compose recently moved to beta. This means there will no longer be any drastic changes in the API structure. So it would be a great time to learn how to work with this next-generation UI kit for Android development. Layouts are the basic building blocks of the UI, so enjoy the article.

You will need to install Android Studio Canary, Arctic Fox (2020.3.1)


screenOrientation, onSaveInstanceState, setRetainInstance, and ViewModel

Phone
Phone
Photo by Lukenn Sabellano on Unsplash.

In this article, you’re going to learn how to handle configuration changes like screen orientation in Android apps. You will learn the five most commonly used solutions. Pick the one you need based on your requirements.

Introduction

In Android applications, each time a user rotates the screen, keyboard availability, etc., it is known as a configuration change. Configuration changes occur at runtime based on user actions.

When such changes occur, Android components like Activities get recreated or restart. This behavior in Android apps is implemented to adopt the new configuration changes. …


Part 4 of the clean architecture tutorial for Android

Laptop on table
Laptop on table
Photo by Federica Galli on Unsplash.

This is the fourth part of our series on building an Android application with a proper clean architecture. In this installment, we’re going to focus on base classes for Android components and ViewModel to centralize the common work.

Quick Recap

Before going any further, I would highly recommend reading the previous parts of this series where you’ll learn why we should use a clean architecture, how to implement dependency injection using Dagger2, and more.

Siva Ganesh Kantamani

Learn. Code. Write. Repeat. Visit me at https://about.me/sivaganesh_kantamani & Join my email list at https://sgkantamani.substack.com/p/subscribe

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store