Creating an XML Layout

Step 1 involves creating a simple XML layout file with a text view in it (see Listing 5-6). You could load this file into an activity during its startup.

Listing 5-6. XML Layout File for the Test Harness <?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:id="@+id/textViewId" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Debugging Scratch Pad" />

</LinearLayout>

0 0

Post a comment