package com.android.chmo.ui.view;

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

import com.android.chmo.utils.CommonUtils;

/**
 * Created by Administrator on 2018/8/4.
 */

public class TouchScrollView extends ScrollView {
    public TouchScrollView(Context context){
        super(context);
    }
    public TouchScrollView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }


    @Override
    public boolean onTouchEvent(MotionEvent ev) {
        if (ev.getAction() == MotionEvent.ACTION_DOWN) {
            CommonUtils.closeKeybord(this,getContext());
        }
        return super.onTouchEvent(ev);
    }
}
