Chapter 13. Anonymous Classes – Bringing Android Widgets to Life

This chapter could have been called "Even More OOP," as anonymous classes are very much still part of that subject, but as we will see, anonymous classes offer us so much flexibility, especially when it comes to interacting with the UI, that I thought they deserved a chapter title dedicated to them and one of their key uses in Android.

Now that we have a good overview of both the layout and coding of an Android app, as well as our newly acquired insight into object-oriented programming and how we can manipulate the UI from our Java code, we are ready to experiment with more widgets from the palette, alongside anonymous classes.

OOP is a tricky thing at times, and anonymous classes ...

Get Android Programming for Beginners - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.