您好我必须在水平滚动视图中实现回收站视图..我必须使用水平滚动视图滚动和回收站视图项目在回收站视图和水平滚动视图之间的垂直scrolling.conflict
<View
android:id="@+id/header_view"
android:layout_width="100dp"
android:layout_height="30dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:background="@drawable/header_background">
</View>
//customn scroll view
<com.app.Constants.CustomHorizontalScrollView
android:id="@+id/layer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/hView"
android:orientation="vertical">
</com.app.Constants.CustomHorizontalScrollView>
我已经动态地将回收者视图插入其中,这是我的要求
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="360dp"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycleview_list"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
我尝试使用此代码但无法水平滚动
recyclerView.addOnItemTouchListener(new RecyclerView.OnItemTouchListener() {
@Override
public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
Log.e("innnn","func");
rv.getParent().requestDisallowInterceptTouchEvent(true);
return false;
}
@Override
public void onTouchEvent(RecyclerView rv, MotionEvent e) {
}
@Override
public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {
}
});