package com.noa.realtime;

import android.content.Context;
import android.graphics.Canvas;
import android.view.View;


/**
 * Created by Noa on 30/10/2017.
 */

public class MyView extends View {


    private Manager manager;

    public MyView(Context context) {

        super(context);
        setOnTouchListener(new TouchListener(this));
        this.manager = new Manager(this);

    }


    protected void onDraw(Canvas canvas) {

        this.manager.onDraw(canvas);
    }

    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);

        this.manager.init();
    }

    public Manager getManager() {

        return this.manager;
    }

}
