package de.jg_cody.Teraplex.ui.rooms;

import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class ViewHolderSingleButton implements IViewHolder {

        String command;
        Button bRun;

        public ViewHolderSingleButton(Button bRun, String command) {
            this.bRun = bRun;
            this.command = command;

            bRun.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Toast.makeText(bRun.getContext(),command + " ON",Toast.LENGTH_SHORT).show();
                }
            });


        }
        @Override
        public String getCommand() {
            return command;
        }
        public Button getbRun() {
            return bRun;
        }
        @Override
        public View[] getViews()
        {
            return new View[]{getbRun(),};


        }
}
