diff --git a/app/build.gradle b/app/build.gradle index a86317474..df49a870f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,7 +32,7 @@ android { } dependencies { - compile 'com.simplemobiletools:commons:2.21.13' + compile 'com.simplemobiletools:commons:2.21.14' compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0' compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index c147ff035..7b01d358a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -213,7 +213,8 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { private fun checkIfColorChanged() { if (directories_grid.adapter != null && getRecyclerAdapter().foregroundColor != config.primaryColor) { getRecyclerAdapter().updatePrimaryColor(config.primaryColor) - directories_fastscroller.updateHandleColor() + directories_vertical_fastscroller.updateHandleColor() + directories_horizontal_fastscroller.updateHandleColor() } } @@ -395,7 +396,18 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { itemClicked(it.path) } } - directories_fastscroller.setViews(directories_grid, directories_refresh_layout) + + directories_vertical_fastscroller.isHorizontal = false + directories_vertical_fastscroller.beGoneIf(config.scrollHorizontally) + + directories_horizontal_fastscroller.isHorizontal = true + directories_horizontal_fastscroller.beVisibleIf(config.scrollHorizontally) + + if (config.scrollHorizontally) { + directories_horizontal_fastscroller.setViews(directories_grid, directories_refresh_layout) + } else { + directories_vertical_fastscroller.setViews(directories_grid, directories_refresh_layout) + } } private fun checkLastMediaChanged() { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 363104c0a..7fa039bbf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -128,7 +128,8 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { private fun checkIfColorChanged() { if (media_grid.adapter != null && getRecyclerAdapter().foregroundColor != config.primaryColor) { getRecyclerAdapter().updatePrimaryColor(config.primaryColor) - media_fastscroller.updateHandleColor() + media_horizontal_fastscroller.updateHandleColor() + media_vertical_fastscroller.updateHandleColor() } } @@ -144,7 +145,18 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { itemClicked(it.path) } } - media_fastscroller.setViews(media_grid, media_refresh_layout) + + media_vertical_fastscroller.isHorizontal = false + media_vertical_fastscroller.beGoneIf(config.scrollHorizontally) + + media_horizontal_fastscroller.isHorizontal = true + media_horizontal_fastscroller.beVisibleIf(config.scrollHorizontally) + + if (config.scrollHorizontally) { + media_horizontal_fastscroller.setViews(media_grid, media_refresh_layout) + } else { + media_vertical_fastscroller.setViews(media_grid, media_refresh_layout) + } } private fun checkLastMediaChanged() { diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index c4f47cbb5..19fd7e7bd 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -20,13 +20,41 @@ app:spanCount="@integer/directory_columns_vertical_scroll"/> + android:paddingStart="@dimen/normal_margin"> + + + + + + + + + diff --git a/app/src/main/res/layout/activity_media.xml b/app/src/main/res/layout/activity_media.xml index 50818e430..ce7f66a4c 100644 --- a/app/src/main/res/layout/activity_media.xml +++ b/app/src/main/res/layout/activity_media.xml @@ -20,13 +20,41 @@ app:spanCount="@integer/media_columns_vertical_scroll"/> + android:paddingStart="@dimen/normal_margin"> + + + + + + + + + diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 078bfe2ca..94881326b 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -214,8 +214,7 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:padding="@dimen/activity_margin" - android:visibility="gone"> + android:padding="@dimen/activity_margin">