Summary

In this chapter, we have seen how to build a simple EPG with many functionalities, but we have probably left many others without an implementation. For instance, our TV program rendering is rather simple, and we could add way more information inside the TV program box, such as the duration, start time, and end time, or even show the TV program description directly there.

Feel free to take what's in the GitHub repository and play with it, add new customizations or functionalities, and adapt it to your needs.

We haven't specifically talked about performance that much, but we have tried to minimize the amount of allocations inside our onDraw method and the methods called by it as much as possible, and we have reduced what we are drawing on the screen as much as possible and don't even process elements that will fall outside the screen boundaries.

Taking into account these details is critical if we want our custom view, or the EPG in this case, to be snappy, responsive, and scale with more channels and TV programs.

In the next chapter we will be building another complex custom view that we can use to draw graphs on our Android applications.