O'Reilly logo

Android Programming for Beginners by John Horton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing the dialog designs

Now, we will do something that we have done many times before, but for a new reason. As we know, we will have two dialog windows. One for the user to enter a new note and one for the user to view a note of their choice.

We can design the layouts of these two dialog windows in exactly the same way as we have designed all our previous layouts. When we come to create the Java code for the DialogFragment classes, we will then see how we incorporate these layouts.

First, let's add a layout for our "new note" dialog:

  1. Right-click on the layout folder in the project explorer and select Layout resource file under New. Enter dialog_new_note in the File name field and RelativeLayout in the Root element field. Click on OK to generate ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required