All pastes #2134633 Raw Edit

Mine

public java v1 · immutable
#2134633 ·published 2012-04-02 00:09 UTC
rendered paste body
package garrettp.liftingbuddy;import garrettp.liftingbuddy.data.LBDatabaseAdapter;import garrettp.liftingbuddy.data.LBDatabaseHelper;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.view.View;import android.view.View.OnClickListener;import android.widget.Button;public class LiftingBuddyActivity extends Activity {	public static LBDatabaseAdapter database;	    /** Called when the activity is first created. */    @Override    public void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.main);                // Instantiate the database        database = new LBDatabaseAdapter(getApplicationContext());                // Hook up the buttons        Button logLifts = (Button) findViewById(R.id.log_lifts);        logLifts.setOnClickListener(new OnClickListener() {			public void onClick(View v) {				Intent i = new Intent();				i.setClassName("garrettp.liftingbuddy",						"garrettp.liftingbuddy.screens.LogLiftsActivity");				startActivity(i);			}		});                Button editLifts = (Button) findViewById(R.id.edit_lifts);        editLifts.setOnClickListener(new OnClickListener() {			public void onClick(View v) {				Intent i = new Intent();				i.setClassName("garrettp.liftingbuddy",						"garrettp.liftingbuddy.screens.EditLiftsActivity");				startActivity(i);			}		});                Button viewProgress = (Button) findViewById(R.id.view_progress);        viewProgress.setOnClickListener(new OnClickListener() {			public void onClick(View v) {				Intent i = new Intent();				i.setClassName("garrettp.liftingbuddy",						"garrettp.liftingbuddy.screens.ViewProgressActivity");			}		});                Button dropTables = (Button) findViewById(R.id.drop_tables_button);        dropTables.setOnClickListener(new OnClickListener() {        	public void onClick(View v) {        		getApplicationContext().deleteDatabase(LBDatabaseHelper.DB_NAME);        	}        });    }}