package patrice;

import java.util.ArrayList;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.Button;
import net.kerul.fstmdirektori.R;
import android.widget.ListView;
import android.widget.Toast;

public class DisplayList extends Activity 
{
	
	Button btn1;

	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main_activity);
		
		Button btn1 = (Button) findViewById(R.id.button1);
        btn1.setOnClickListener(new View.OnClickListener()
        {
             public void onClick(View v) 
             {
            	 Toast.makeText(getApplicationContext(), "msg msg", Toast.LENGTH_SHORT).show();
            	 Intent i = new Intent(DisplayList.this, DisplayList.class);
            	 startActivity(i);
             }
        });
		
		
	}

    @Override
    public boolean onCreateOptionsMenu(Menu menu) 
    {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.display_list, menu);
        return true;
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item)
    {
        // Handle item selection
        if (item.getItemId()==R.id.m_add_record) 
        {
        	
        	//invoke the AddNewRecord screen using Intent
        	Intent i = new Intent(getApplicationContext(),AddNewRecord.class);
			startActivity(i);
        }
        return true;
    }
    
}
