Hopefully fixing issues with buttons in library filter sheet

This commit is contained in:
Jays2Kings 2021-04-08 23:14:44 -04:00
parent 3c08b81a94
commit bbb435c294
2 changed files with 11 additions and 0 deletions

View File

@ -31,6 +31,7 @@ import eu.kanade.tachiyomi.util.view.inflate
import eu.kanade.tachiyomi.util.view.isExpanded
import eu.kanade.tachiyomi.util.view.isHidden
import eu.kanade.tachiyomi.util.view.updatePaddingRelative
import eu.kanade.tachiyomi.util.view.visible
import eu.kanade.tachiyomi.util.view.visibleIf
import kotlinx.coroutines.CoroutineStart
import kotlinx.coroutines.Dispatchers
@ -138,6 +139,12 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri
binding.firstLayout.addView(binding.reorderFilters)
binding.firstLayout.addView(binding.viewOptions)
binding.secondLayout.gone()
} else if (binding.reorderFilters.parent == binding.firstLayout) {
binding.firstLayout.removeView(binding.viewOptions)
binding.firstLayout.removeView(binding.reorderFilters)
binding.secondLayout.addView(binding.reorderFilters)
binding.secondLayout.addView(binding.viewOptions)
binding.secondLayout.visible()
}
}

View File

@ -76,6 +76,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:maxLines="2"
android:text="@string/group_library_by"
android:textColor="?android:attr/textColorPrimary"
app:icon="@drawable/ic_label_outline_24dp"
@ -86,6 +87,7 @@
style="@style/Theme.Widget.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:text="@string/expand_all_categories"
android:textColor="?android:attr/textColorPrimary"
app:icon="@drawable/ic_expand_more_24dp"
@ -105,6 +107,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:maxLines="2"
android:text="@string/reorder_filters"
android:textColor="?android:attr/textColorPrimary"
app:icon="@drawable/ic_swap_vert_24dp"
@ -116,6 +119,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:maxLines="2"
android:text="@string/display_options"
android:textColor="?android:attr/textColorPrimary"
app:icon="@drawable/ic_tune_24dp"