Eclipse Mobile Mousw Instrukcja Użytkownika Strona 8

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 35
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 7
View elements consist of familiar UI elements, including:
Button
ImageButton
EditText
TextView (similar to a label)
CheckBox
Radio Button
Gallery and ImageSwitcher for displaying multiple images
List
Grid
DatePicker
TimePicker
Spinner (similar to a combo box)
AutoComplete (EditText with auto text-complete feature)
Views are defined in an XML file. Listing 3 shows an example of a simple
LinearVertical layout.
Listing 3. Simple LinearVertical layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Activity 1!"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Activity 1, second text view!"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Switch To Activity 2"
id="@+id/switchto2"
/>
</LinearLayout>
developerWorks® ibm.com/developerWorks
Develop Android applications with Eclipse
Page 8 of 35 © Copyright IBM Corporation 1994, 2008. All rights reserved.
Przeglądanie stron 7
1 2 3 4 5 6 7 8 9 10 11 12 13 ... 34 35

Komentarze do niniejszej Instrukcji

Brak uwag