-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: band-aid bottom sheets flipping out pre-30
Caused by busted legacy window insets behavior biting me again.
- Loading branch information
1 parent
c9d4b01
commit b0b55b5
Showing
6 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
app/src/main/java/org/oxycblt/auxio/ui/EatInsetsFrameLayout.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.oxycblt.auxio.ui | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import android.view.WindowInsets | ||
import android.widget.FrameLayout | ||
import androidx.annotation.AttrRes | ||
|
||
/** | ||
* A [FrameLayout] that works around the pre-Android 10 behavior of propagating | ||
* mutated insets to sibling views. Wrap this around views that to isolate | ||
* mutated window insets. | ||
* | ||
* @author Alexander Capehart (OxygenCobalt) | ||
*/ | ||
class EatInsetsFrameLayout | ||
@JvmOverloads | ||
constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr: Int = 0) : | ||
FrameLayout(context, attrs, defStyleAttr) { | ||
init { | ||
clipToPadding = false | ||
} | ||
|
||
override fun dispatchApplyWindowInsets(insets: WindowInsets): WindowInsets { | ||
super.dispatchApplyWindowInsets(insets) | ||
return insets | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule media
updated
1398 files