package net.cs76.lectures.activity01;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

/*
 * Activity01
 * Dan Armendariz
 * Computer Science E-76
 * 
 * Demonstrates Hello, World by programmatically creating
 *  a layout. Code adapted from:
 * http://developer.android.com/resources/tutorials/hello-world.html
 */


public class Code1 extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);        
        TextView tv = new TextView(this);
        tv.setText("Ohai!");
        setContentView(tv);

        // sample logging capability (check with logcat)
        Log.i("Activity01", "Completed onCreate()");
        Log.e("Activity01", "This is an error");
    }
}