From fa0614175af86fdf91a504f244c890b823c1df04 Mon Sep 17 00:00:00 2001 From: Paul Akhamiogu Date: Fri, 27 Aug 2021 13:31:56 +0100 Subject: [PATCH] Update Breadcrumbs and commons library version --- app/build.gradle | 2 +- .../filemanager/pro/activities/MainActivity.kt | 2 +- .../filemanager/pro/fragments/ItemsFragment.kt | 2 +- app/src/main/res/layout/items_fragment.xml | 6 +++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 7e6382db..0580912f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -58,7 +58,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:16ae1d2c03' + implementation 'com.github.SimpleMobileTools:Simple-Commons:8979ca8187' implementation 'com.github.Stericson:RootTools:df729dcb13' implementation 'com.github.Stericson:RootShell:1.6' implementation 'com.alexvasilkov:gesture-views:2.5.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt index 4f806260..da278734 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt @@ -547,7 +547,7 @@ class MainActivity : SimpleActivity() { return } - if (getCurrentFragment()!!.breadcrumbs.childCount <= 1) { + if (getCurrentFragment()!!.breadcrumbs.itemsCount <= 1) { if (!wasBackJustPressed && config.pressBackTwice) { wasBackJustPressed = true toast(R.string.press_back_again) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/ItemsFragment.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/ItemsFragment.kt index e935585a..a694e675 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/ItemsFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/ItemsFragment.kt @@ -494,7 +494,7 @@ class ItemsFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerF openPath(it) } } else { - val item = breadcrumbs.getChildAt(id).tag as FileDirItem + val item = breadcrumbs.getItem(id) openPath(item.path) } } diff --git a/app/src/main/res/layout/items_fragment.xml b/app/src/main/res/layout/items_fragment.xml index cda96fa8..5aa25ced 100644 --- a/app/src/main/res/layout/items_fragment.xml +++ b/app/src/main/res/layout/items_fragment.xml @@ -24,7 +24,11 @@ android:id="@+id/breadcrumbs" android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="@dimen/activity_margin" /> + android:paddingStart="@dimen/activity_margin" + android:paddingEnd="@dimen/small_margin" + android:paddingTop="@dimen/small_margin" + android:paddingBottom="@dimen/small_margin" + />