Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Android UIs with Custom Views

You're reading from   Building Android UIs with Custom Views Build amazing custom user interfaces with Android custom views

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781785882869
Length 294 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Raimon Ràfols Montane Raimon Ràfols Montane
Author Profile Icon Raimon Ràfols Montane
Raimon Ràfols Montane
Arrow right icon
View More author details
Toc

Summary

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime