Game Development Reference
In-Depth Information
Figure 7-2. Doom displaying the game layout
Listing 7-3 shows Doom's relative layout XML. The most important attributes are explained in Table 7-3.
Table 7-3. Main Attributes of doom.xml
Attribute
Meaning
android:id="@+id/doom_iv"
Defines the ID of the widget, which can be used for
programmatic access. The format must be @+id/NAME .
android:layout_width="fill_parent"
Defines the width of the widget. The values can be
fill_parent or wrap_content .
android:focusableInTouchMode="true"
Specifies that the widget should be focusable and receive
touch events from the main activity.
android:focusable="true"
Specifies that the widget should be focusable and receive
key events from the main activity.
Search WWH ::




Custom Search