Java 在相对布局上向下拖动控制柄

Java 在相对布局上向下拖动控制柄,java,android,android-view,Java,Android,Android View,我有一个相对的布局,有一个水平滚动图像查看器。问题在于此相对布局的父视图也是SwipeToRefreshLayout,因此当用户稍微向下滚动时,它会启动ac。请参阅代码: <android.support.v4.widget.SwipeRefreshLayout android:id="@+id/item_activity_swipe_refresh_layout" xmlns:android="http://schemas.android.com/apk/

我有一个相对的布局,有一个水平滚动图像查看器。问题在于此相对布局的父视图也是SwipeToRefreshLayout,因此当用户稍微向下滚动时,它会启动ac。请参阅代码:

    <android.support.v4.widget.SwipeRefreshLayout
      android:id="@+id/item_activity_swipe_refresh_layout"
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".item.ItemActivity">



      <android.support.design.widget.CoordinatorLayout
        android:id="@+id/item_activity_coordinatorLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <android.support.design.widget.AppBarLayout
          android:id="@+id/item_activity_app_bar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:fitsSystemWindows="true"
          app:elevation="0dp"
          app:theme="@style/ToolbarStyle">

          <!--  This is the view I dont want to handle Swipe to refresh/Scroll content up (Scrolling down the screen) -->
            <RelativeLayout
                android:id="@+id/scrollable_image_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                app:layout_behavior="@string/appbar_scrolling_view_behavior"/>


                <!--    ....omit other code -->
        </android.support.design.widget.AppBarLayout>
      </android.support.design.widget.CoordinatorLayout>  
    </android.support.v4.widget.SwipeRefreshLayout>

但这让我难以置信,我不确定这是否是我应该看到的正确的东西

是否有其他人必须处理水平滚动图像或任何滑动以刷新布局


请提供帮助:(

作为评论总结,RecyclerView非常适合于水平项目滚动问题。它比ViewPager更好,因为它支持回收项目。以及其他东西,如动画


为了防止SwipeRefreshLayout
对垂直移动的触动如此敏感,你可以使用

你有一些非常特殊的图像滑块吗?因为它通常基于水平
RecyclerView
并且没有这样的问题。我正在使用一个viewpager。我现在尝试实现RecyclerView,但它仍然存在相同的问题看看并提问谢谢!!!这个问题为我解决了!如果你愿意,你可以把它作为你的答案,我会接受的!非常感谢!