For Android Development the Canvas Framework is the one of most important technology that you can learn, however is one of the most underestimated too. In this article I will explain how to create a simple Line Chart with Canvas, and how you can simplify the drawing process.

When you create a View and override the onDraw(…) you earn all power of that View, and all responsibilities too. An important responsibility is not put much process in this method, because it is called in every state of a view, every invalidade(…), requestLayout(…), onSizeChanged(..),

Photo by Mohammad Rahmani from Unsplash

Durante vários anos como desenvolvedor Android, tive sempre o RecyclerView como parceiro para muitas das funcionalidades que entreguei em todas as empresas para as quais trabalhei. Todavia, cada nova funcionalidade leva-me, frequentemente, a enfrentar um desafio mais difícil, o que me fez adquirir muita experiência e passar por alguns bugs também.

Um dos maiores desafios com que me deparei foi o de unir diferentes Views e ViewHolders na mesma Lista. Para que isto aconteça, é necessário implementar o método getItemViewType(…) e passar manualmente para o RecyclerView’s Adapter todos os Tipos Inteiros disponíveis. …

During several years as an Android Developer, I always had the RecyclerView as a partner for many of the features that I delivered for all the companies that I’ve worked for. But each new feature often leads me to face a harder challenge, which brings me experience and some bugs as well.

One of the greatest challenges that I’ve come across is to bind different Views and ViewHolders in the same List. …

Gustavo Santorio

Android Staff Engineer at XP Inc.

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