package com.smartcar.pvrmemoryleakdemo;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.FrameLayout;

/**
 * Created by lijiandong on 2017/4/11.
 */
public class FrameLayoutEx extends FrameLayout{


    public FrameLayoutEx(Context context) {
        super(context);
    }

    public FrameLayoutEx(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public FrameLayoutEx(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

 /*   @Override
    public boolean onTouchEvent(MotionEvent event) {
        switch (event.getAction()){
            case MotionEvent.ACTION_DOWN:
                if(listern!=null) {
                    listern.onClose();
                }
                break;
        }
        return super.onTouchEvent(event);
    }*/

    public OnTouchEventLinster listern;
    public void setTouchEvent(OnTouchEventLinster listern){
        this.listern=listern;
    }

    public interface OnTouchEventLinster {
        void onClose();
    }
}
