home: stop fabs from eating touch events
This commit is contained in:
parent
e0059e9dc0
commit
998375f28a
3 changed files with 6 additions and 0 deletions
|
@ -27,6 +27,7 @@ import androidx.activity.BackEventCompat
|
||||||
import androidx.activity.OnBackPressedCallback
|
import androidx.activity.OnBackPressedCallback
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
import androidx.core.view.isInvisible
|
import androidx.core.view.isInvisible
|
||||||
|
import androidx.core.view.isVisible
|
||||||
import androidx.fragment.app.activityViewModels
|
import androidx.fragment.app.activityViewModels
|
||||||
import androidx.navigation.findNavController
|
import androidx.navigation.findNavController
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
|
@ -367,6 +368,9 @@ class MainFragment :
|
||||||
requireNotNull(sheetBackCallback) { "SheetBackPressedCallback was not available" }
|
requireNotNull(sheetBackCallback) { "SheetBackPressedCallback was not available" }
|
||||||
.invalidateEnabled()
|
.invalidateEnabled()
|
||||||
|
|
||||||
|
// Stop the FrameLayout containing the fabs from eating touch events elsewhere
|
||||||
|
binding.mainFabContainer.isVisible = binding.homeNewPlaylistFab.mainFab.isVisible && binding.homeShuffleFab.isVisible
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
tools:layout="@layout/fragment_home" />
|
tools:layout="@layout/fragment_home" />
|
||||||
|
|
||||||
<org.oxycblt.auxio.home.EdgeFrameLayout
|
<org.oxycblt.auxio.home.EdgeFrameLayout
|
||||||
|
android:id="@+id/main_fab_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
android:visibility="invisible" />
|
android:visibility="invisible" />
|
||||||
|
|
||||||
<org.oxycblt.auxio.home.EdgeFrameLayout
|
<org.oxycblt.auxio.home.EdgeFrameLayout
|
||||||
|
android:id="@+id/main_fab_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
|
|
Loading…
Reference in a new issue