Skip to content

Commit 2d9428f

Browse files
committed
add fastscroller
1 parent 402ec7d commit 2d9428f

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

app/src/main/kotlin/com/simplemobiletools/filemanager/fragments/ItemsFragment.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class ItemsFragment : android.support.v4.app.Fragment(), ItemsAdapter.ItemOperat
8989
this@apply.adapter = adapter
9090
addItemDecoration(RecyclerViewDivider(context))
9191
}
92+
items_fastscroller.setViews(items_list, items_swipe_refresh)
9293
} else {
9394
val state = (items_list.layoutManager as LinearLayoutManager).onSaveInstanceState()
9495
(currAdapter as ItemsAdapter).updateItems(mItems)

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

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,29 @@
1111
android:layout_width="match_parent"
1212
android:layout_height="wrap_content">
1313

14-
<android.support.v7.widget.RecyclerView
15-
android:id="@+id/items_list"
14+
<RelativeLayout
15+
android:id="@+id/items_wrapper"
1616
android:layout_width="match_parent"
17-
android:layout_height="wrap_content"
18-
android:clipToPadding="false"
19-
android:paddingLeft="@dimen/activity_margin"
20-
android:scrollbars="vertical"
21-
app:layoutManager="android.support.v7.widget.LinearLayoutManager"/>
17+
android:layout_height="wrap_content">
18+
19+
<android.support.v7.widget.RecyclerView
20+
android:id="@+id/items_list"
21+
android:layout_width="match_parent"
22+
android:layout_height="wrap_content"
23+
android:clipToPadding="false"
24+
android:paddingLeft="@dimen/activity_margin"
25+
android:scrollbars="none"
26+
app:layoutManager="android.support.v7.widget.LinearLayoutManager"/>
27+
28+
<com.simplemobiletools.commons.views.FastScroller
29+
android:id="@+id/items_fastscroller"
30+
android:layout_width="wrap_content"
31+
android:layout_height="match_parent"
32+
android:layout_alignParentEnd="true"
33+
android:layout_alignParentRight="true"
34+
android:paddingLeft="@dimen/normal_margin"
35+
android:paddingStart="@dimen/normal_margin"/>
36+
</RelativeLayout>
2237

2338
</android.support.v4.widget.SwipeRefreshLayout>
2439

0 commit comments

Comments
 (0)