package com.artisanalapps;

/****************************************************************************
 * MyRecordCollectionActivity.java 
 * Gloria Hedlund
 * Teaching Fellow
 * Harvard Extension School 
 * CSCI-E76
 * 
 * This is the initial activity/start up screen for a Record Collection 
 * application.  The intended purpose of this app is to showcase the use of 
 * SQLite for Android.  With this app, the user can add and delete records and 
 * cds to his/her music collection.
 *******************************************************************************/

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 MyRecordCollectionActivity extends Activity implements OnClickListener
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Button viewButton = (Button) findViewById(R.id.view_button);
		viewButton.setOnClickListener(this);
		Button addButton = (Button) findViewById(R.id.add_button);
		addButton.setOnClickListener(this);
    }

	public void onClick(View view) {
		
		switch(view.getId()){
		
		case R.id.view_button: {
			Intent rcv = new Intent(getBaseContext(), RecordCollectionView.class);
			startActivity(rcv);
			break;
		}
		case R.id.add_button: {
			Intent ab = new Intent(getBaseContext(), AddRecord.class);
			startActivity(ab);
			break;
		}
		default:
			break;
		}
		
	}
}