Skip to content

Commit 1303088

Browse files
committed
Add custom fast scrool
1 parent 0cee7a4 commit 1303088

File tree

9 files changed

+39
-31
lines changed

9 files changed

+39
-31
lines changed

app/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ android {
1313
minSdk 21
1414
//noinspection OldTargetApi
1515
targetSdk 33
16-
versionCode 34
17-
versionName "3.4"
16+
versionCode 35
17+
versionName "3.5"
1818
ndk {
1919
abiFilters 'armeabi-v7a', 'x86', 'arm64-v8a', 'x86_64'
2020
}
@@ -49,6 +49,7 @@ android {
4949

5050
dependencies {
5151
implementation fileTree(dir: 'libs', include: ['*.jar'])
52+
5253
implementation 'androidx.cardview:cardview:1.0.0'
5354
implementation 'androidx.annotation:annotation:1.6.0'
5455
implementation 'androidx.preference:preference-ktx:1.2.0'
@@ -59,6 +60,7 @@ dependencies {
5960

6061
implementation "com.mikepenz:fastadapter:5.7.0"
6162
implementation "com.mikepenz:fastadapter-extensions-binding:5.7.0"
63+
implementation 'com.simplecityapps:recyclerview-fastscroll:2.0.1'
6264

6365
implementation 'org.jetbrains:annotations:24.0.1'
6466
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.0"

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@
8383
android:gravity="center"
8484
android:orientation="vertical">
8585

86-
<androidx.recyclerview.widget.RecyclerView
86+
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
8787
android:id="@+id/class_activity_list_view"
8888
android:layout_width="match_parent"
8989
android:layout_height="match_parent"
9090
android:divider="@null"
91-
app:fastScrollEnabled="true"
92-
app:fastScrollHorizontalThumbDrawable="@drawable/thumb_drawable"
93-
app:fastScrollHorizontalTrackDrawable="@drawable/line_drawable"
94-
app:fastScrollVerticalThumbDrawable="@drawable/thumb_drawable"
95-
app:fastScrollVerticalTrackDrawable="@drawable/line_drawable"
91+
android:listSelector="@android:color/transparent"
92+
app:fastScrollAutoHide="false"
93+
app:fastScrollPopupBgColor="@color/colorAccent"
94+
app:fastScrollPopupTextColor="@android:color/primary_text_dark"
95+
app:fastScrollThumbColor="@color/colorAccent"
9696
tools:listitem="@layout/item_symbols" />
9797

9898
<TextView

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,15 @@
5151

5252
</LinearLayout>
5353

54-
<androidx.recyclerview.widget.RecyclerView
54+
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
5555
android:id="@+id/items"
5656
android:layout_width="match_parent"
5757
android:layout_height="match_parent"
5858
android:divider="@null"
5959
android:listSelector="@android:color/transparent"
60-
android:scrollbarStyle="outsideOverlay"
60+
app:fastScrollPopupBgColor="@color/colorAccent"
61+
app:fastScrollPopupTextColor="@android:color/primary_text_dark"
62+
app:fastScrollThumbColor="@color/colorAccent"
6163
tools:listitem="@layout/item_files" />
6264

6365
</RelativeLayout>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@
8383
android:gravity="center"
8484
android:orientation="vertical">
8585

86-
<androidx.recyclerview.widget.RecyclerView
86+
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
8787
android:id="@+id/symbols_activity_list_view"
8888
android:layout_width="match_parent"
8989
android:layout_height="match_parent"
9090
android:divider="@null"
91-
app:fastScrollEnabled="true"
92-
app:fastScrollHorizontalThumbDrawable="@drawable/thumb_drawable"
93-
app:fastScrollHorizontalTrackDrawable="@drawable/line_drawable"
94-
app:fastScrollVerticalThumbDrawable="@drawable/thumb_drawable"
95-
app:fastScrollVerticalTrackDrawable="@drawable/line_drawable"
91+
android:listSelector="@android:color/transparent"
92+
app:fastScrollAutoHide="false"
93+
app:fastScrollPopupBgColor="@color/colorAccent"
94+
app:fastScrollPopupTextColor="@android:color/primary_text_dark"
95+
app:fastScrollThumbColor="@color/colorAccent"
9696
tools:listitem="@layout/item_symbols" />
9797

9898
<TextView

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@
8383
android:gravity="center"
8484
android:orientation="vertical">
8585

86-
<androidx.recyclerview.widget.RecyclerView
86+
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
8787
android:id="@+id/vtable_activity_list_view"
8888
android:layout_width="match_parent"
8989
android:layout_height="match_parent"
9090
android:divider="@null"
91-
app:fastScrollEnabled="true"
92-
app:fastScrollHorizontalThumbDrawable="@drawable/thumb_drawable"
93-
app:fastScrollHorizontalTrackDrawable="@drawable/line_drawable"
94-
app:fastScrollVerticalThumbDrawable="@drawable/thumb_drawable"
95-
app:fastScrollVerticalTrackDrawable="@drawable/line_drawable"
91+
android:listSelector="@android:color/transparent"
92+
app:fastScrollAutoHide="false"
93+
app:fastScrollPopupBgColor="@color/colorAccent"
94+
app:fastScrollPopupTextColor="@android:color/primary_text_dark"
95+
app:fastScrollThumbColor="@color/colorAccent"
9696
tools:listitem="@layout/item_symbols" />
9797

9898
<TextView

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,16 @@
9494
android:gravity="center"
9595
android:orientation="vertical">
9696

97-
<androidx.recyclerview.widget.RecyclerView
97+
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
9898
android:id="@+id/recycler_view"
9999
android:layout_width="match_parent"
100100
android:layout_height="match_parent"
101101
android:divider="@null"
102-
app:fastScrollEnabled="true"
103-
app:fastScrollHorizontalThumbDrawable="@drawable/thumb_drawable"
104-
app:fastScrollHorizontalTrackDrawable="@drawable/line_drawable"
105-
app:fastScrollVerticalThumbDrawable="@drawable/thumb_drawable"
106-
app:fastScrollVerticalTrackDrawable="@drawable/line_drawable"
102+
android:listSelector="@android:color/transparent"
103+
app:fastScrollAutoHide="false"
104+
app:fastScrollPopupBgColor="@color/colorAccent"
105+
app:fastScrollPopupTextColor="@android:color/primary_text_dark"
106+
app:fastScrollThumbColor="@color/colorAccent"
107107
tools:listitem="@layout/item_symbols" />
108108

109109
<TextView

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
android:clickable="true"
2222
android:focusable="true"
2323
android:gravity="center_vertical"
24-
android:padding="8dip">
24+
android:padding="8dp">
2525

2626
<LinearLayout
2727
android:layout_width="0dp"

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
android:layout_marginTop="8dp"
1313
android:layout_marginEnd="8dp"
1414
android:background="?android:attr/selectableItemBackground"
15-
android:orientation="horizontal"
1615
tools:ignore="UselessParent">
1716

1817
<LinearLayout
@@ -25,7 +24,6 @@
2524
android:id="@+id/symbolslistitemimg"
2625
android:layout_width="wrap_content"
2726
android:layout_height="wrap_content"
28-
android:layout_centerInParent="true"
2927
tools:ignore="ContentDescription"
3028
tools:src="@drawable/ic_box_blue" />
3129

settings.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ pluginManagement {
33
gradlePluginPortal()
44
google()
55
mavenCentral()
6+
maven {
7+
url "https://jitpack.io"
8+
}
69
}
710
}
811

@@ -11,6 +14,9 @@ dependencyResolutionManagement {
1114
repositories {
1215
google()
1316
mavenCentral()
17+
maven {
18+
url "https://jitpack.io"
19+
}
1420
}
1521
}
1622

0 commit comments

Comments
 (0)