Mickey Williamson

Category Archives: Android

Android Fragments and Static Factory Methods

Typically when we create a class, we create one or more constructors for the class: We then use the “new” operator to instantiate the class and pass in an argument: This works in the more common scenarios but isn’t flexible enough in others. What if we needed to: Return an subclass of the class instead […]

Database inspection window in Chrome DevTools from Android emulator

Set Up Stetho to View Your Room Database

Building an app that uses a backend database for persistent data storage without access to the database can be like playing darts in the dark. While building out the app’s functionality, how do you know whether data is getting stored in the database correctly or even at all? There are several methods for viewing your […]

Building blueprints

The Builder Design Pattern

Instantiating Objects with Many Properties Let’s build a house!  First, let’s decide what kind of house we want to build: Construction type = timber frame Stories = 2 Roof type = slate Siding = batten-board Basement = true Attic = true Size = 2000 sq ft Bedrooms = 3 Bathrooms = 2 Technology = alarm […]