package com.view;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class EventItemWindow extends Activity {
	public static final int REQ_ITEM_UPDATE=0;
	private int eid;
	
	TextView tv_name,tv_addr,tv_publisher;
	
	Button bt_close,bt_detail,bt_previous,bt_next;
	
	View main;
	
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		this.setContentView(R.layout.eventwindow);
		
		
		tv_name=(TextView)findViewById(R.id.event_item_name);
		tv_addr=(TextView)findViewById(R.id.event_item_addr);
		tv_publisher=(TextView)findViewById(R.id.event_item_publisher);
		
		bt_close=(Button)findViewById(R.id.close_event_item);
		bt_detail=(Button)findViewById(R.id.detail_event_item);
		
		bt_close.setOnClickListener(click_close);
		bt_detail.setOnClickListener(click_detail);
		
		main=new View(this);
	}

	public static void requestUpdate(Activity parent)
	{
		Intent item=new Intent(parent,EventItemWindow.class);
		
		parent.startActivityForResult(item,REQ_ITEM_UPDATE);
	}
	
	OnClickListener click_detail=new OnClickListener()
	{
		public void onClick(View view)
		{
			//handle search commands
			Bundle b=new Bundle();
			//b.putString("Event_Id", et_keywds.getText().toString());
			
			setResult(RESULT_OK);
			finish();
		}
	};
	OnClickListener click_close=new OnClickListener()
	{
		public void onClick(View v)
		{
			setResult(Activity.RESULT_CANCELED);
			finish();
		}
	};
}
