|
|
@@ -0,0 +1,47 @@
|
|
|
+package kr.co.zumo.app.lifeplus.view.custom;
|
|
|
+
|
|
|
+import android.content.Context;
|
|
|
+import android.util.AttributeSet;
|
|
|
+import android.view.MotionEvent;
|
|
|
+import android.widget.ScrollView;
|
|
|
+
|
|
|
+/**
|
|
|
+ * CustomScrollView
|
|
|
+ * <pre>
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * @author 하세미
|
|
|
+ * @version 1.0
|
|
|
+ * @history 하세미 [2018-12-03] [최초 작성]
|
|
|
+ * @since 2018-12-03
|
|
|
+ */
|
|
|
+public class CustomScrollView extends ScrollView {
|
|
|
+
|
|
|
+ public CustomScrollView(Context context) {
|
|
|
+ super(context);
|
|
|
+ }
|
|
|
+
|
|
|
+ public CustomScrollView(Context context, AttributeSet attrs) {
|
|
|
+ super(context, attrs);
|
|
|
+ }
|
|
|
+
|
|
|
+ public CustomScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
|
|
|
+ super(context, attrs, defStyleAttr);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean onInterceptTouchEvent(MotionEvent ev) {
|
|
|
+ switch (ev.getAction()) {
|
|
|
+ case MotionEvent.ACTION_SCROLL:
|
|
|
+ case MotionEvent.ACTION_DOWN:
|
|
|
+ case MotionEvent.ACTION_MOVE:
|
|
|
+ case MotionEvent.ACTION_UP:
|
|
|
+ getParent().requestDisallowInterceptTouchEvent(true);
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+}
|