package com.futurice.android.reservator.view;

import com.futurice.android.reservator.R;
import com.futurice.android.reservator.model.Room;
import com.futurice.android.reservator.model.TimeSpan;
import com.futurice.android.reservator.view.LobbyReservationRowView.OnCancellListener;
import com.futurice.android.reservator.view.LobbyReservationRowView.OnReserveListener;

import android.app.Dialog;
import android.content.Context;
import android.view.View;

public class RoomReservationPopup extends Dialog {
	LobbyReservationRowView reservationView;
	public RoomReservationPopup(Context context, TimeSpan timeLimits, TimeSpan presetTime, Room room) {
		super(context, R.style.Theme_Transparent);
		setCancelable(true);

		setContentView(R.layout.reservation_popup);
		findViewById(R.id.relativeLayout1).setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				cancel();
			}
		});
		reservationView = (LobbyReservationRowView)findViewById(R.id.roomReservationView1);
		reservationView.setAnimationDuration(0);
		reservationView.setClickable(true);
		reservationView.setRoom(room);
		reservationView.resetTimeSpan();
		reservationView.setMinTime(timeLimits.getStart());
		reservationView.setMaxTime(timeLimits.getEnd());
		reservationView.timePicker2.setStartTime(presetTime.getStart());
		reservationView.timePicker2.setEndTime(presetTime.getEnd());
		reservationView.setEndTimeRelatively(60);
		reservationView.setOnCancellListener(new OnCancellListener() {
			@Override
			public void onCancel(LobbyReservationRowView view) {
				cancel();
			}
		});
		reservationView.setOnReserveCallback(new OnReserveListener() {
			@Override
			public void call(LobbyReservationRowView v) {
				cancel();
			}
		});
		reservationView.setReserveMode();
	}

	public void setOnReserveCallback(OnReserveListener onReserveCallback) {
		reservationView.setOnReserveCallback(onReserveCallback);
	}
}

@@ -556,16 +556,77 @@
 nView;%0D%0A
+%0D%0A%09public RoomReservationPopup() %7B%0D%0A%09%09super(null, 0);%0D%0A%09%7D%0D%0A%0D%0A
 %09public 

Add empty constructor for RoomReservationPopup