FileDocCategorySizeDatePackage
HelloWorld.javaAPI DocGoogle Android v1.5 Example2053Sun Nov 11 13:01:04 GMT 2007com.google.android.samples.app

HelloWorld

public class HelloWorld extends android.app.Activity
Simple example of writing an application Activity. Hello World

This demonstrates the basic code needed to write a Screen activity.

Demo

App/Activity/Hello World

Source files

src/com/google/android/samples/app/HelloWorld.java The Hello World Screen implementation
/res/any/layout/hello_world.xml Defines contents of the screen

Fields Summary
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle icicle)
Initialization of the Activity after it is first created. Must at least call {@link android.app.Activity#setContentView setContentView()} to describe what is to be displayed in the screen.

        // Be sure to call the super class.
        super.onCreate(icicle);

        // See assets/res/any/layout/hello_world.xml for this
        // view layout definition, which is being set here as
        // the content of our screen.
        setContentView(R.layout.hello_world);