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).
- Open the file in the
/res/layoutdirectory of your project named
main.xmlin you favorite IDE or text editor.
- Delete any template XML code.
- 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" ...