Reusable SpaceX rockets. Credits to SpaceX https://www.flickr.com/photos/spacex/25254688767

Member-only story

How to start writing reusable components for Android apps?

Maciek Malak
The Startup
Published in
9 min readNov 22, 2019

--

The purpose

For anyone, like myself, interested in building custom, reusable view components for an Android app. And those who had problems with finding good guidelines on the topic.

I will provide the basic reasoning behind architecting custom reusable views. There won’t be implementation details (code) for many reasons,
one of those is my trial to focus on the concept rather than technicalities.

Anyway, I hope that after reading this article you will be able to apply those principles to any interface architecture pattern such as MVP, MVC, MVVM
or MVI.

The first part says why and when adapt such technique.
You can jump to the second part for the list of recommendations.

First, ask yourself a question: Do we need reusable components?

IMHO you should be a part of a bigger, long-lasting project to consider doing so. I understand it’s hard to draw a line between MVP/short-term
and a long-term project sometimes. It is sometimes also hard to let go of technical nicety such as custom views but please be mature to do so.
The following list should help you making a decision.

--

--

The Startup
The Startup

Published in The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Maciek Malak
Maciek Malak

Written by Maciek Malak

ex-R&D dev | Stuff Engineer | Android Expert | AWS Certified Dev | Opinions are my own. | Fanboy of AI, but AI is not there yet.

No responses yet