January 2014
Intermediate to advanced
736 pages
70h 43m
English
The activity_main.xml layout for this app’s MainActivity contains only the Doodle-Fragment. To add this Fragment to the layout:
1. Open activity_main.xml in the Graphical Layout editor, editor, then follow the steps in Section 2.5.2 to switch from a FrameLayout to a RelativeLayout.
2. From the Palette’s Layouts section, drag a Fragment onto the design area or onto the RelativeLayout node in the Outline window.
3. The preceding step displays the Choose Fragment Class dialog. Click Create New... to display the New Java Class dialog.
4. Enter DoodleFragment in the dialog’s Name field, change the Superclass field’s value to android.app.Fragment and click Finish to create the class. The IDE opens the ...
Read now
Unlock full access