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. …


An introduction to clean architecture

Image for post
Image for post
Photo by Luca Bravo on Unsplash

In the early stages of my career, I thought completing a task as quickly as possible was what made you a productive developer. I’m sure many of you thought the same, but you know what they say:

“ Good judgment comes from experience, and experience comes from bad judgment.”

Fast-forward to today, and I’m an Android developer with five years of experience. The most vital lesson I’ve learned from my experience is that having the proper architecture is just as important as finishing the job on time.

A day or a year from now, you’ll probably end up in a…


A guide to building MVVM architecture-based apps

Man drawing phone design
Man drawing phone design
Photo by William Iven on Unsplash.

This is the second part of a series in which you’ll learn about data binding basics and how to use data binding with architecture components like LiveData and ViewModel. In today’s article, you’ll learn how to use LiveData to update the UI via data binding, keeping ViewModel as the data source.

Introduction

Data binding

Data binding is the framework that acts as a bridge between layouts and data sources by reducing the boilerplate code that developers need to write. This will increase the productivity of developers by providing them with the time to concentrate on what matters.

If you’re new to data binding…


Online status, permissions, spannable strings, and more

Crayons
Crayons
Photo by Ave Calvar on Unsplash.

You might have already gone through a bunch of articles related to Kotlin extensions, but this article is not all about extensions. It’s about making your code expressive, so I’ve compiled a list of my top extensions that keep code as natural as possible.

This is the second part of this series. If you’re new to Kotlin or the concept of extensions, I would highly recommend reading the first part to learn the basics.

1. isOnline

A network request is an inevitable task to perform in most mobile applications. Checking whether the user is connected to the internet or not is crucial…


Build beautiful, customizable lists in your Android apps

Sticky notes on a wall
Sticky notes on a wall
Photo by Kelly Sikkema on Unsplash.

In this article, you’ll learn how to implement RecyclerView, which offers you the ability to swipe items. We’re going to do this without using any third-party libraries. We’ll use RecyclerView default decorators and a couple of interfaces to achieve this.

If you’re interested, a GitHub repo link with the implementation is embedded at the end of the article.

Let’s get started!

Introduction

If you’ve been an Android developer for a while, you know that RecyclerView is the optimized solution to display huge datasets with effective memory management.

Unlike its predecessor (listview), RecyclerView comes with huge support like ItemTouchHelper, simple animations, and…


Combine the power of data binding with architecture components

Two-way street
Two-way street
Photo by Marissa&Eric on Unsplash.

This is the beginning of a series in which you’ll learn about data binding basics and how to use data binding with architecture components like LiveData and ViewModel.

In this part, we’ll cover the basics, two-way binding, and code optimization.

Introduction

Data binding is a framework that acts as a bridge between layouts and data sources by reducing the boilerplate code that developers need to write. This will increase their productivity by providing them with the time to concentrate on what matters.

I assume you’re familiar with the basics of data binding. …


Extract bundle parameters, validate strings, and more

Crayons surrounding a phone
Crayons surrounding a phone
Photo by Vanja Matijevic on Unsplash.

You might have already gone through a bunch of articles on Kotlin extensions, but this article is not all about extensions. It’s about making your code expressive, so I’ve concentrated on explaining and including my top extensions that keep code as natural as possible.

The main goal is to learn how to make your code expressive in your own way by using the concept of extensions rather than copy-pasting the code snippets.

Introduction

Kotlin is a modern and expressive language built with developers in mind. …


Use the powerful Android framework in your Windows app

Jetpack Compose logo
Jetpack Compose logo
Photo by the author.

Until now, we’ve only seen Jetpack Compose in Android development. Today, we’re entering a new phase, as JetBrains announced an early-access version of IntelliJ that allows you to use Jetpack Compose to build Windows applications.

This is the first of many articles I will write in the coming days explaining how to use Jetpack Compose for desktop. Last month, JetBrains released Compose for desktop Milestone 2, which brings a better development experience and interoperability.

As always, JetBrains is trying to ease developers’ lives by providing exclusive project wizards. …


No more findViewById. It’s time to upgrade

Links of a chain
Links of a chain
Photo by Daniel von Appen on Unsplash.

Today, you’ll learn how to link views with the code using view binding instead of legacy findViewById or a heavyweight data-binding framework. In my previous articles, we covered the basics. In this article, we’ll cover Android components like dialogs and adapters.

Introduction

For those who are new to view binding, it’s a lightweight library from the Jetpack family to link views with Android components. In the current Android environment, we have four solutions to link views with Android components:

  • findViewById — This is the legacy solution that involves more manual work.
  • Kotlin synthetics — This is a decent solution from Kotlin’s…

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