Книга: Beginning Android

TableLayout Example

TableLayout Example

The XML layout fragments shown previously, when combined, give us a TableLayout rendition of the “form” we created for RelativeLayout, with the addition of a divider line between the label/field and the two buttons (found in the Containers/Table demo in the Source Code area of http://apress.com):

<?xml version="1.0" encoding="utf-8"?>
   android:text="URL:" />
  <EditText android:id="@+id/entry"
  android:background="#0000FF" />
  <Button android:id="@+id/cancel"
   android:text="Cancel" />
  <Button android:id="@+id/ok"
   android:text="OK" />

When compiled against the generated Java code and run on the emulator, we get the result shown in Figure 7-7.

Figure 7-7. The TableLayoutDemo sample application

Оглавление книги

Оглавление статьи/книги

Генерация: 1.123. Запросов К БД/Cache: 3 / 1
Вверх Вниз