package com.example.bb;

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;
import android.widget.CheckBox;

public class Reservation extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.reservation);

		final CheckBox cb = (CheckBox) findViewById(R.id.smoking);
        cb.setOnClickListener(new OnClickListener() {
            public void onClick(View view) {
                findViewById(R.id.room1).setEnabled(!cb.isChecked());
                findViewById(R.id.room2).setEnabled(!cb.isChecked());
                findViewById(R.id.room3).setEnabled(!cb.isChecked());
                findViewById(R.id.room4).setEnabled(cb.isChecked());
                findViewById(R.id.room5).setEnabled(cb.isChecked());
            }
        });
		
        Button next = (Button) findViewById(R.id.done);
        next.setOnClickListener(new OnClickListener() {
            public void onClick(View view) {
                Intent i = new Intent();
                i.setClass(Reservation.this, ThankYouActivity.class);
                startActivity(i);
            }
        });
    }
}