mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: Legacy appbar is visible on compose
This commit is contained in:
parent
d992c007c4
commit
d0fad42fb4
4 changed files with 15 additions and 1 deletions
|
@ -10,6 +10,10 @@
|
|||
## Additions
|
||||
- Ported Tachi's cutout option
|
||||
|
||||
## Changes
|
||||
- Repositioned cutout options in settings
|
||||
|
||||
## Fixes
|
||||
- Fixed splash icon hardcoded to white
|
||||
- Fixed preference summary not updating after being changed once
|
||||
- Fixed legacy appbar is visible on compose when being launched from deeplink
|
|
@ -17,6 +17,7 @@ abstract class BaseComposeController(bundle: Bundle? = null) :
|
|||
container: ViewGroup,
|
||||
savedViewState: Bundle?
|
||||
): View {
|
||||
hideLegacyAppBar()
|
||||
return ComposeView(container.context).apply {
|
||||
layoutParams = ViewGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
|
|
|
@ -141,4 +141,12 @@ abstract class BaseController(bundle: Bundle? = null) :
|
|||
true
|
||||
}
|
||||
}
|
||||
|
||||
fun hideLegacyAppBar() {
|
||||
(activity as? AppCompatActivity)?.findViewById<View>(R.id.app_bar)?.isVisible = false
|
||||
}
|
||||
|
||||
fun showLegacyAppBar() {
|
||||
(activity as? AppCompatActivity)?.findViewById<View>(R.id.app_bar)?.isVisible = true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ abstract class BaseLegacyController<VB : ViewBinding>(bundle: Bundle? = null) :
|
|||
val isBindingInitialized get() = this::binding.isInitialized
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup, savedViewState: Bundle?): View {
|
||||
showLegacyAppBar()
|
||||
binding = createBinding(inflater)
|
||||
binding.root.backgroundColor = binding.root.context.getResourceColor(R.attr.background)
|
||||
return binding.root
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue