Преглед изворни кода

原因:XRecyclerView中嵌套了别的XRecyclerView造成了滑动焦点冲突。
解决方法:在最外层的XRecyclerView中加上:android:descendantFocusability="blocksDescendants"

zengjiebin пре 7 година
родитељ
комит
1ca37242d0
1 измењених фајлова са 7 додато и 11 уклоњено
  1. 7 11
      app/src/main/res/layout/fgt_try_makemoney_layout.xml

+ 7 - 11
app/src/main/res/layout/fgt_try_makemoney_layout.xml

@@ -3,22 +3,18 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:paddingBottom="@dimen/content_padding_10"
-    android:paddingStart="4dp"
-    android:paddingEnd="4dp">
+    android:paddingEnd="4dp"
+    android:paddingStart="4dp">
 
     <include
         android:id="@+id/empty_view"
         layout="@layout/empty_view"
         android:layout_width="match_parent"
         android:layout_height="match_parent" />
-    <!--<com.sheep.gamegroup.view.customview.SheepmSwipeRefreshLayout-->
-        <!--android:id="@+id/refresh"-->
-        <!--android:layout_width="match_parent"-->
-        <!--android:layout_height="wrap_content">-->
 
-        <com.jcodecraeer.xrecyclerview.XRecyclerView
-            android:id="@+id/recyclerview"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" />
-    <!--</com.sheep.gamegroup.view.customview.SheepmSwipeRefreshLayout>-->
+    <com.jcodecraeer.xrecyclerview.XRecyclerView
+        android:id="@+id/recyclerview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:descendantFocusability="blocksDescendants" />
 </RelativeLayout>