1. Are you ready for the Galaxy S20? Here is everything we know so far!

problems adding a RadioGroup in Mark L. Murphy's android tutorial

Discussion in 'Android Development' started by Mikhail617, Aug 17, 2010.

  1. Mikhail617

    Mikhail617 Lurker
    Thread Starter

    I'm going through the "A Fancier Form" chapter in Mark L. Murphy's "Android Tutorials" book (1st edition) and I can't get past step#2: Add a RadioGroup. The application compiles and installs on emulator and phone with no errors but when I try to run it I get the:

    Sorry!
    The application LunchList
    (process apt.tutorial) has
    stopped unexpectedly. Please try
    again.

    This is the code from the book (the only code that changes in that section is the RadioGroup part):

    <?xml version="1.0" encoding="utf-8"?>
    <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:stretchColumns="1"
    >
    <TableRow>
    <TextView android:text="Name:" />
    <EditText android:id="@+id/name" />
    </TableRow>
    <TableRow>
    <TextView android:text="Address:" />
    <EditText android:id="@+id/addr" />
    </TableRow>
    <TableRow>
    <TextView android:text="Type:" />
    <RadioGroup android:id="@+id/types">
    <RadioButton android:id="@+id/take_out"
    android:text="Take-Out"
    />
    <RadioButton android:id="@+id/sit_down"
    android:text="Sit-Down"
    />
    <RadioButton android:id="@+id/delivery"
    android:text="Delivery"
    />
    </RadioGroup>
    </TableRow>
    <Button android:id="@+id/save"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Save"
    />
    </TableLayout>

    Any ideas anyone???

    Thanks,
    ~Mike
     


Loading...
Similar Threads - problems adding RadioGroup
  1. Rgarner
    Replies:
    5
    Views:
    156
  2. Axelmorgana
    Replies:
    0
    Views:
    93
  3. varamilc
    Replies:
    7
    Views:
    391
  4. varamilc
    Replies:
    7
    Views:
    561
  5. PDX_Dragon
    Replies:
    0
    Views:
    388
  6. callmefishmael
    Replies:
    4
    Views:
    200
  7. Somdatta
    Replies:
    7
    Views:
    247
  8. Wilma Swinson
    Replies:
    5
    Views:
    290
  9. LyleB
    Replies:
    2
    Views:
    259
  10. Ziomaletto
    Replies:
    2
    Views:
    1,813

Share This Page

Loading...