In this chapter we have seen how to build a charts custom view to draw graphs in our Android applications. We have also quickly covered how to manage paddings, RTL / LTR support, and we have finally added some complexity to our custom view by supporting multiple data sets or adding the features of zooming and scrolling.
Also, the way we've implemented this custom view; using independent data ranges and adapting it dynamically to the screen, means it'll automatically adjust to any screen resolution or for example, to an orientation change. This is usually a good practice and will prevent many issues when testing our custom view on several devices. In addition, making the sizes of everything we draw on the screen depend on the screen density, like we did in our previous example, will make the portability even easier.
In the next chapter, we will show how to build...