Considering that the setContentView( ) method is being told to set main.xml as the
current View, and main.xml contains a TextView that says “Hello World, HelloWorldText,”
it may be safe to assume that compiling and running HelloWorldText now will give
you your Hello World! application. To test this, run your unaltered HelloWorldText
application. Choose Run | Run to open the Run As dialog box, select Android Application,
and click OK.
The new project you just established contains the code to create a Hello World!
application on its own. However, that is not very engaging, nor does it teach you very
much about programming an Android application. You need to dissect the project and
see exactly how the project displayed the “Hello World!” message.
What happened when you created the new Android project is that the Android plugin
modified main.xml. This is a perfect example of one way to modify the UI in Android.
The following lines of code are added to main.xml by the Android SDK when the project
is created:
<TextView
android:layout_width=”fill_parent”
android:layout_height=”wrap_content”
android:text=”Hello World, HelloWorldText”
/>



