AndroidでHorizontalScrollViewを継承したCustomViewが横スクロールしない
お世話になります。
表題の通り、HorizontalScrollviewを継承したCustomViewを作成し、
xmlにCustomViewを配置したのですが、何故か横スクロールされずに困っております。
CustomView
public final class ScrollCustom extends HorizontalScrollView {
public ScrollCustom(Context context) {
super(context);
}
public ScrollCustom(Context context, AttributeSet att) {
super(context, att);
}
public ScrollCustom(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
public int getMaxScrollAmount() {
return super.getMaxScrollAmount();
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
Log.v("Test", "RecycleTest" + " onInterceptTouchEvent");
int x = (int) event.getX();
int y = (int) event.getY();
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
TaskRecyclerAdapter.downWidth = x;
TaskRecyclerAdapter.downHeight = y;
screenX = x;
screenY = y;
Log.v("Test", "RecycleTest" + ", ACTION_DOWN " + x + " : " + y);
break;
case MotionEvent.ACTION_MOVE:
TaskRecyclerAdapter.moveWidth = x;
TaskRecyclerAdapter.moveHeight = y;
Log.v("Test", "RecycleTest" + ", ACTION_MOVE " + x + " : " + y);
break;
case MotionEvent.ACTION_UP:
TaskRecyclerAdapter.upWidth = x;
TaskRecyclerAdapter.upHeight = y;
Log.v("Test", "RecycleTest" + ", ACTION_UP " + x + " : " + y);
break;
}
return false;
}
@Override
public boolean onTouchEvent(MotionEvent event) {
Log.v("Test", "RecycleTest" + " onTouchEvent");
return false;
}
}
xml
<number_8.co.jp.constructiontaskapp.view.ScrollCustom
android:id="@+id/kanban_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
>
<android.support.v7.widget.RecyclerView
android:id="@+id/kanban_recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="10dp"
android:layout_marginStart="10dp"
android:paddingTop="10dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
/>
</number_8.co.jp.constructiontaskapp.view.ScrollCustom>
初心者ですのでおかしな点はあると思いますが
ご教示の程よろしくお願いします。