Merge pull request #498 from KryptKode/feat/breadcrumbs-one-liner

Update Breadcrumbs
This commit is contained in:
Tibor Kaputa 2021-08-27 14:59:09 +02:00 committed by GitHub
commit 8bd2416ef3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View file

@ -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'

View file

@ -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)

View file

@ -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)
}
}

View file

@ -24,7 +24,11 @@
android:id="@+id/breadcrumbs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/activity_margin" />
android:layout_marginTop="@dimen/medium_margin"
android:paddingStart="@dimen/activity_margin"
android:paddingTop="@dimen/small_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingBottom="@dimen/small_margin" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/items_placeholder"