Allan Caine
1 min readJul 2, 2018

--

This is a good demonstration of creating a versatile UI.

Two suggestions to improve it. First, QuickDialog would be best as a subclass of Dialog.

Second, dialogs work best if they are nested inside a DialogFragment. The dialog is lifecycle aware.

For example, QuickDialogFragment could be a subclass of DialogFragment. QuickDialogFragment is abstract.

Subclasses of QuickDialogFragment override the methods of QuickDialogFragment. For example, there could be an abstract method which returns the positive button listener. Other abstract methods would exist representing the properties of the QuickDialog.

Every concrete subclass of QuickDialogFragment represents a unique realization of the QuickDialog. Each realization suits the client’s specific requirements.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Allan Caine
Allan Caine

Written by Allan Caine

Senior Android Developer, TD Bank (Canada) (Opinions are my own)

Responses (1)

Write a response