Skip to content

Commit 62bd273

Browse files
committed
fix new fastscroller in SwipeRefreshLayout by swapping parents
1 parent d741dc5 commit 62bd273

File tree

2 files changed

+47
-46
lines changed

2 files changed

+47
-46
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ android {
5757
}
5858

5959
dependencies {
60-
implementation 'com.github.SimpleMobileTools:Simple-Commons:51f1996098'
60+
implementation 'com.github.SimpleMobileTools:Simple-Commons:a09d871ffd'
6161
implementation 'com.github.Stericson:RootTools:df729dcb13'
6262
implementation 'com.github.Stericson:RootShell:1.6'
6363
implementation 'com.alexvasilkov:gesture-views:2.5.2'

app/src/main/res/layout/items_fragment.xml

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,61 +10,62 @@
1010
android:layout_width="match_parent"
1111
android:layout_height="match_parent">
1212

13-
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
14-
android:id="@+id/items_swipe_refresh"
13+
<RelativeLayout
14+
android:id="@+id/items_wrapper"
1515
android:layout_width="match_parent"
1616
android:layout_height="wrap_content">
1717

18-
<RelativeLayout
19-
android:id="@+id/items_wrapper"
18+
<com.simplemobiletools.commons.views.Breadcrumbs
19+
android:id="@+id/breadcrumbs"
2020
android:layout_width="match_parent"
21-
android:layout_height="wrap_content">
21+
android:layout_height="wrap_content"
22+
android:layout_marginTop="@dimen/medium_margin"
23+
android:paddingStart="@dimen/activity_margin"
24+
android:paddingTop="@dimen/small_margin"
25+
android:paddingEnd="@dimen/small_margin"
26+
android:paddingBottom="@dimen/small_margin" />
2227

23-
<com.simplemobiletools.commons.views.Breadcrumbs
24-
android:id="@+id/breadcrumbs"
25-
android:layout_width="match_parent"
26-
android:layout_height="wrap_content"
27-
android:layout_marginTop="@dimen/medium_margin"
28-
android:paddingStart="@dimen/activity_margin"
29-
android:paddingTop="@dimen/small_margin"
30-
android:paddingEnd="@dimen/small_margin"
31-
android:paddingBottom="@dimen/small_margin" />
28+
<com.simplemobiletools.commons.views.MyTextView
29+
android:id="@+id/items_placeholder"
30+
android:layout_width="match_parent"
31+
android:layout_height="wrap_content"
32+
android:layout_below="@+id/breadcrumbs"
33+
android:layout_centerHorizontal="true"
34+
android:alpha="0.8"
35+
android:gravity="center"
36+
android:paddingStart="@dimen/activity_margin"
37+
android:paddingEnd="@dimen/activity_margin"
38+
android:text="@string/no_items_found"
39+
android:textSize="@dimen/bigger_text_size"
40+
android:textStyle="italic"
41+
android:visibility="gone" />
3242

33-
<com.simplemobiletools.commons.views.MyTextView
34-
android:id="@+id/items_placeholder"
35-
android:layout_width="match_parent"
36-
android:layout_height="wrap_content"
37-
android:layout_below="@+id/breadcrumbs"
38-
android:layout_centerHorizontal="true"
39-
android:alpha="0.8"
40-
android:gravity="center"
41-
android:paddingStart="@dimen/activity_margin"
42-
android:paddingEnd="@dimen/activity_margin"
43-
android:text="@string/no_items_found"
44-
android:textSize="@dimen/bigger_text_size"
45-
android:textStyle="italic"
46-
android:visibility="gone" />
43+
<com.simplemobiletools.commons.views.MyTextView
44+
android:id="@+id/items_placeholder_2"
45+
android:layout_width="wrap_content"
46+
android:layout_height="wrap_content"
47+
android:layout_below="@+id/items_placeholder"
48+
android:layout_centerHorizontal="true"
49+
android:alpha="0.8"
50+
android:background="?attr/selectableItemBackground"
51+
android:gravity="center"
52+
android:padding="@dimen/activity_margin"
53+
android:text="@string/type_2_characters"
54+
android:textSize="@dimen/bigger_text_size"
55+
android:textStyle="italic"
56+
android:visibility="gone" />
4757

48-
<com.simplemobiletools.commons.views.MyTextView
49-
android:id="@+id/items_placeholder_2"
50-
android:layout_width="wrap_content"
51-
android:layout_height="wrap_content"
52-
android:layout_below="@+id/items_placeholder"
53-
android:layout_centerHorizontal="true"
54-
android:alpha="0.8"
55-
android:background="?attr/selectableItemBackground"
56-
android:gravity="center"
57-
android:padding="@dimen/activity_margin"
58-
android:text="@string/type_2_characters"
59-
android:textSize="@dimen/bigger_text_size"
60-
android:textStyle="italic"
61-
android:visibility="gone" />
58+
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
59+
android:id="@+id/items_swipe_refresh"
60+
android:layout_width="match_parent"
61+
android:layout_height="wrap_content"
62+
android:layout_below="@+id/breadcrumbs">
6263

6364
<com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller
6465
android:id="@+id/items_fastscroller"
6566
android:layout_width="match_parent"
6667
android:layout_height="wrap_content"
67-
android:layout_below="@+id/breadcrumbs">
68+
app:supportSwipeToRefresh="true">
6869

6970
<com.simplemobiletools.commons.views.MyRecyclerView
7071
android:id="@+id/items_list"
@@ -76,8 +77,8 @@
7677
app:layoutManager="com.simplemobiletools.commons.views.MyGridLayoutManager" />
7778

7879
</com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller>
79-
</RelativeLayout>
80-
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
80+
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
81+
</RelativeLayout>
8182

8283
<com.simplemobiletools.commons.views.MyFloatingActionButton
8384
android:id="@+id/items_fab"

0 commit comments

Comments
 (0)