Have you ever wrote an adapter with interactions and thought that you would like that logic in another place? Or it should be cleaner and easier to read? If so, this is the place to be. If not, keep reading and I am sure it will change your mind.

Here you can find the code before and after the adapter refactor.

The problem

The snippets below shows the first version of a RecyclerView Adapter with logic for clicking on add/remove buttons and it’s layout file.

The problem with this adapter is that the ViewHolder is holding values and some logic to add/remove/etc……

Hello! Hope you’re good and I can help you with some small UI improvements. In this article you'll learn about merge, include and ViewStub, which will help you to have a better layout structure.

Everyone know, or at least should know, the importance of reusing code instead of copy and paste the same snippet all over the project, but almost nobody do the same with UI code, the XML one. But why?

Well, since you're here there is a chance that you want to make a better UI code or at least have curiosity for it. …

Hello! Hope you’re doing good and I can help you with some Simple Android Animations. Since this is my very first article I will make a short presentation.

My name's Johan, also known as Kugra/Kuggra, and I’m mobile developer about 5 years now. That’s it! Any questions? Okay! So now that you know me, let’s get started.

To better understand you can download this project that has three animations as sample and a view with two planes drawables to make the test easier.

So first things first! Lemme explain some of our xml attributes and tags:

- Set:

Set is a container for the other tags like Translate, Scale, Rotate and Alpha.

Common attributes:

  • android:fillAfter: when set…

Johan Kovalsikoski

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