Skip to content

Commit

Permalink
Add custom fast scrool
Browse files Browse the repository at this point in the history
  • Loading branch information
timscriptov committed Jun 12, 2023
1 parent 0cee7a4 commit 1303088
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 31 deletions.
6 changes: 4 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
minSdk 21
//noinspection OldTargetApi
targetSdk 33
versionCode 34
versionName "3.4"
versionCode 35
versionName "3.5"
ndk {
abiFilters 'armeabi-v7a', 'x86', 'arm64-v8a', 'x86_64'
}
Expand Down Expand Up @@ -49,6 +49,7 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.annotation:annotation:1.6.0'
implementation 'androidx.preference:preference-ktx:1.2.0'
Expand All @@ -59,6 +60,7 @@ dependencies {

implementation "com.mikepenz:fastadapter:5.7.0"
implementation "com.mikepenz:fastadapter-extensions-binding:5.7.0"
implementation 'com.simplecityapps:recyclerview-fastscroll:2.0.1'

implementation 'org.jetbrains:annotations:24.0.1'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.0"
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/layout/activity_class.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@
android:gravity="center"
android:orientation="vertical">

<androidx.recyclerview.widget.RecyclerView
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
android:id="@+id/class_activity_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@null"
app:fastScrollEnabled="true"
app:fastScrollHorizontalThumbDrawable="@drawable/thumb_drawable"
app:fastScrollHorizontalTrackDrawable="@drawable/line_drawable"
app:fastScrollVerticalThumbDrawable="@drawable/thumb_drawable"
app:fastScrollVerticalTrackDrawable="@drawable/line_drawable"
android:listSelector="@android:color/transparent"
app:fastScrollAutoHide="false"
app:fastScrollPopupBgColor="@color/colorAccent"
app:fastScrollPopupTextColor="@android:color/primary_text_dark"
app:fastScrollThumbColor="@color/colorAccent"
tools:listitem="@layout/item_symbols" />

<TextView
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@

</LinearLayout>

<androidx.recyclerview.widget.RecyclerView
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
android:id="@+id/items"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@null"
android:listSelector="@android:color/transparent"
android:scrollbarStyle="outsideOverlay"
app:fastScrollPopupBgColor="@color/colorAccent"
app:fastScrollPopupTextColor="@android:color/primary_text_dark"
app:fastScrollThumbColor="@color/colorAccent"
tools:listitem="@layout/item_files" />

</RelativeLayout>
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/layout/activity_symbols.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@
android:gravity="center"
android:orientation="vertical">

<androidx.recyclerview.widget.RecyclerView
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
android:id="@+id/symbols_activity_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@null"
app:fastScrollEnabled="true"
app:fastScrollHorizontalThumbDrawable="@drawable/thumb_drawable"
app:fastScrollHorizontalTrackDrawable="@drawable/line_drawable"
app:fastScrollVerticalThumbDrawable="@drawable/thumb_drawable"
app:fastScrollVerticalTrackDrawable="@drawable/line_drawable"
android:listSelector="@android:color/transparent"
app:fastScrollAutoHide="false"
app:fastScrollPopupBgColor="@color/colorAccent"
app:fastScrollPopupTextColor="@android:color/primary_text_dark"
app:fastScrollThumbColor="@color/colorAccent"
tools:listitem="@layout/item_symbols" />

<TextView
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/layout/activity_v_table.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@
android:gravity="center"
android:orientation="vertical">

<androidx.recyclerview.widget.RecyclerView
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
android:id="@+id/vtable_activity_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@null"
app:fastScrollEnabled="true"
app:fastScrollHorizontalThumbDrawable="@drawable/thumb_drawable"
app:fastScrollHorizontalTrackDrawable="@drawable/line_drawable"
app:fastScrollVerticalThumbDrawable="@drawable/thumb_drawable"
app:fastScrollVerticalTrackDrawable="@drawable/line_drawable"
android:listSelector="@android:color/transparent"
app:fastScrollAutoHide="false"
app:fastScrollPopupBgColor="@color/colorAccent"
app:fastScrollPopupTextColor="@android:color/primary_text_dark"
app:fastScrollThumbColor="@color/colorAccent"
tools:listitem="@layout/item_symbols" />

<TextView
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/layout/floating_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@
android:gravity="center"
android:orientation="vertical">

<androidx.recyclerview.widget.RecyclerView
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@null"
app:fastScrollEnabled="true"
app:fastScrollHorizontalThumbDrawable="@drawable/thumb_drawable"
app:fastScrollHorizontalTrackDrawable="@drawable/line_drawable"
app:fastScrollVerticalThumbDrawable="@drawable/thumb_drawable"
app:fastScrollVerticalTrackDrawable="@drawable/line_drawable"
android:listSelector="@android:color/transparent"
app:fastScrollAutoHide="false"
app:fastScrollPopupBgColor="@color/colorAccent"
app:fastScrollPopupTextColor="@android:color/primary_text_dark"
app:fastScrollThumbColor="@color/colorAccent"
tools:listitem="@layout/item_symbols" />

<TextView
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/item_files.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:padding="8dip">
android:padding="8dp">

<LinearLayout
android:layout_width="0dp"
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/layout/item_symbols.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:background="?android:attr/selectableItemBackground"
android:orientation="horizontal"
tools:ignore="UselessParent">

<LinearLayout
Expand All @@ -25,7 +24,6 @@
android:id="@+id/symbolslistitemimg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
tools:ignore="ContentDescription"
tools:src="@drawable/ic_box_blue" />

Expand Down
6 changes: 6 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pluginManagement {
gradlePluginPortal()
google()
mavenCentral()
maven {
url "https://jitpack.io"
}
}
}

Expand All @@ -11,6 +14,9 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven {
url "https://jitpack.io"
}
}
}

Expand Down

0 comments on commit 1303088

Please sign in to comment.