package it.unimi.di.laren.smartwash.View;

import it.unimi.di.laren.smartwash.R;
import it.unimi.di.laren.smartwash.Controller.Instruction_Controller;
import it.unimi.di.laren.smartwash.R.layout;
import it.unimi.di.laren.smartwash.R.menu;
import android.os.Bundle;
import android.app.Activity;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.ImageView;

public class InstructionActivity extends Activity {
	public ImageView img;
	public ImageButton left;
	public ImageButton right;
	public int step = 1;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_instruction);
		img = (ImageView)findViewById(R.id.imageInstr);
		left = (ImageButton)findViewById(R.id.arrLeft);
		right = (ImageButton)findViewById(R.id.arrRight);
		left.setVisibility(View.GONE);
		
		Instruction_Controller controller = new Instruction_Controller(this);
		left.setOnClickListener(controller);
		right.setOnClickListener(controller);
	}
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
	    if ((keyCode == KeyEvent.KEYCODE_BACK)) {
	        // start new Activity here
//	    	Intent showMain = new Intent(this,
//					MainActivity.class);
//			this.startActivity(showMain);
	    	this.finish();
	    }
	    return super.onKeyDown(keyCode, event);
	}
	
}
