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 single file (usually strings.xml) …


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


How to properly set up and use your Java and Kotlin ViewModels

Someone using their phone in the dark
Someone using their phone in the dark
Photo by Christian Wiediger on Unsplash.

Why Should You Use ViewModels?

Before getting started with the best practices for using ViewModels, we should ask ourselves why we should use a ViewModel. The answer is simple: the separation of concerns (SoC). This makes the application maintainable, extensible, and testable.

This can also be achieved through presenters (MVP), but I prefer ViewModels (Clean Architecture or MVVM) because they will not be destroyed instantly when users switch between configurations (landscape and portrait). This solves many traditional problems, such as not executing expensive operations like loading data from servers on configuration change.

SoC is nothing but divide and rule. One of the best real-world examples for understanding SoC is having different departments at a software development company (HR, finance, quality assurance, engineering, etc.). In our case, we’re diving into the business logic and background tasks from UI-related code using ViewModels. …


A look back at the last 5+ years of Android development and how far it’s come

Image for post
Image for post
Photo by Johannes Plenio on Unsplash

Hi Everyone,

It’s Siva from Programming Geeks(Medium)

This week we come up with an article about The Evolution of Android Development. This blog post focus on how far android development has come on different aspects like UI, Security & Privacy, tooling, and more.

Introduction

I created my first ever Android application in 2015. Back then, Android development was entirely different compared to what it is now. There were no Jetpack libraries to learn about best practices when you were dealing with high-performance apps and large datasets and no fancy UI kits like ConstraintLayout or MotionLayout. To be frank, even Android Studio isn’t that smart back then.

Read the rest of the article here:
The Evolution of Android Development

Thank you for continuing to read our articles.


A look at Icon, Image, Remember, Spacer, Radio Button, Loaders, Switch and Checkbox, and Sliders

Colorful template
Colorful template
Photo by the author.

This is the second part of a series that will explore Jetpack Compose components. The main goal is to get to know the Jetpack Compose UI’s standard building blocks, starting from the basics and moving to more advanced components.

As we completed the introduction and integration of Jetpack Compose in part 1, we’ll dive directly into the components without any further delay.

Note: As Jetpack Compose is still not a production-ready framework at this point, the components presented here might be subject to change in further releases.

Icons

The first Jetpack Compose component that we’re going to explore in this article is Icon. The Icon component draws an asset using tint. If we specify else, apply AmbientContentColor by default. …


A look back at the last 5+ years of Android development and how far it’s come

Image for post
Image for post
Photo by Johannes Plenio on Unsplash

I created my first ever Android application in 2015. Back then, Android development was entirely different compared to what it is now. There were no Jetpack libraries to learn about best practices when you were dealing with high-performance apps and large datasets and no fancy UI kits like ConstraintLayout or MotionLayout. To be frank, even Android Studio isn’t that smart back then.

In my experience since the beginning of Android development, I’ve seen tremendous progress in six areas — Language, UI, Libraries, AndroidX, Privacy & Security, and Tools.

Language — Kotlin

In the beginning, I prefer to work with Java than Kotlin due to a lack of resources to learn. It wasn’t that difficult for me because I started learning Java in my college days. So it took three to four months of hard work to start my carrier as an Android developer. …


Learn about static, dynamic, and pinned shortcuts

Two phones on a desk
Two phones on a desk
Photo by The Average Tech Guy on Unsplash.

In the Android ecosystem, shortcuts are a way to quickly provide specific functionality or features to users. Each shortcut can refer to more than one intent. The type of shortcuts for an app typically depends on the core use cases of the application.

For example, if you take the Gmail application, “compose an email” makes sense as one of the static shortcuts. If you take the Chrome application, “navigate to the most visited website” can be considered an ideal dynamic shortcut.

Types of Shortcuts

Shortcuts in Android are mainly classified into three types: static, dynamic, and pinned shortcuts. Let’s learn about each type.

Static shortcuts

These types of shortcuts deliver consistent behavior to users throughout the lifetime of the application, and they’re not context-sensitive. …


Learn how to implement interactive animations using motion layout

Image for post
Image for post

What Is MotionLayout?

MotionLayout is a subclass of ConstraintLayout that includes all of its outstanding features, and it’s fully declarative with the capability to implement complicated transitions in the XML. It is backward-compatible with API level 14, which means it covers 99% of use cases.

The new MotionLayout editor in Android Studio 4.0 makes it easy to work with MotionLayout. It provides a fancy environment to implement transitions, MotionScenes, and more.

To learn the basics and terminology of motion layout, I would highly recommend reading the following article.

In this article we’re going to learn how to implement swipe to lock button with Motion Layout. If you’ve gone through the above article and know the basics of motion layout it’s going to be a piece of cake. …


Medium from Developers Point of View

Image for post
Image for post
Photo by Thought Catalog on Unsplash

I know most of you feel relieved as you think one of the most devastating years of the century came to an end. But for me, 2020 is the year that gave hope to my writing — mostly technical posts.

Even though I started writing on medium back in 2019, I haven’t seen much of the result. This is mainly because of two reasons:

  • I didn’t constantly publish at the beginning.
  • I didn’t take my blogging seriously because of my poor writing skills.

After a couple of years, back in Sep 2019 is when I got some time to concentrate and improve my writing as I reached a stage in my 9 to 5 job. This is when I started writing long articles about in-depth concepts in my niche(Android Development and Kotlin). …


Dialog destinations, deep links, and nested graphs

Person consulting map
Person consulting map
Photo by Glenn Carstens-Peters on Unsplash.

Jetpack’s navigation component is a transformational library that is going to have a huge impact on how developers write code to navigate between screens.

So far, I’ve seen many tutorials focusing on activities and fragments. But Android is more than a bunch of screens. It does have attractive dialogs. Also, deep links are another core aspect of navigation. Finally, as the product grows, we can’t fit all the screens in a single graph, so we need to learn how to group destinations into multiple graphs.

In today’s article, I’m focusing on these three concepts. If you’re not familiar with the Jetpack navigation component, I recommend reading this article and learning the basics first. …

About

Siva Ganesh Kantamani

Learn. Code. Write. Repeat. Visit me at https://about.me/sivaganesh_kantamani & Join my email list at https://tinyletter.com/Siva_Ganesh_Kantamani

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