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. However, as you will see, anonymous classes offer us so much flexibility, especially when it comes to interacting with the User Interface (UI), that I thought they deserved a chapter dedicated to them and their key use in Android.
Now that we have a good overview of both the layout and coding of an Android app, along with our newly acquired insight into Object-Oriented Programming (OOP), 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 are known to be a bit awkward for beginners. However, by gradually learning these new concepts and then practicing them repeatedly, over time, they will become our friends.
In this chapter, we will diversify a lot...