Time for action - setting up the question activity

To kick things off we're going to be working with Android's simplest layout called: LinearLayout. Unlike Java AWT or Swing, Android layout managers are defined as specific container types. Thus a LinearLayout is much like a Panel with a built-in LayoutManager. If you've worked with GWT, you'll be quite familiar with this concept. We'll lay out the screen in a simple top-to-bottom structure (which LinearLayout is perfect for).

  1. Open the file in the /res/layout directory of your project named main.xml in you favorite IDE or text editor.
  2. Delete any template XML code.
  3. Copy the following XML code into the file:
    <?xml version="1.0" encoding="UTF-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" ...

Get Android User Interface Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.