Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
import android.view.MotionEvent
import android.view.View
import androidx.activity.viewModels
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
import androidx.core.view.doOnPreDraw
import androidx.lifecycle.lifecycleScope
import dagger.hilt.android.AndroidEntryPoint
Expand Down Expand Up @@ -171,16 +173,15 @@ class TextPreviewActivity : BlazeBaseActivity() {
overridePendingTransition(0, android.R.anim.fade_out)
}

@Suppress("DEPRECATION")
private fun hideSystemUI() {
window.decorView.systemUiVisibility =
WindowCompat.getInsetsController(window, window.decorView).apply {
hide(WindowInsetsCompat.Type.statusBars())
systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
isAppearanceLightStatusBars = true
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
View.SYSTEM_UI_FLAG_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
} else {
View.SYSTEM_UI_FLAG_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
isAppearanceLightNavigationBars = true
}
}
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import androidx.core.content.FileProvider
import androidx.core.view.drawToBitmap
import androidx.core.view.isInvisible
import androidx.core.view.isVisible
import androidx.core.view.WindowCompat
import androidx.core.view.updateLayoutParams
import androidx.lifecycle.lifecycleScope
import dagger.hilt.android.AndroidEntryPoint
Expand Down Expand Up @@ -141,11 +142,7 @@ class DepositShareActivity : BaseActivity() {
})
}

window.decorView.systemUiVisibility = (
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
)
window.statusBarColor = android.graphics.Color.TRANSPARENT
WindowCompat.setDecorFitsSystemWindows(window, false)

Comment on lines +145 to 146
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DepositShareActivity now opts into edge-to-edge via setDecorFitsSystemWindows(false), but it no longer overrides BaseActivity’s default SystemUIManager.setSafePadding(... bg_white). This likely reintroduces an opaque (theme) background strip behind the status/navigation bars on this blur/overlay screen. Consider calling SystemUIManager.setSafePadding(window, Color.TRANSPARENT) (as MarketShareActivity/AvatarActivity do) or otherwise ensuring the insets area stays transparent to preserve the blurred background.

Copilot uses AI. Check for mistakes.
binding.iconFl.round(6.dp)
binding.content.updateLayoutParams<MarginLayoutParams> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import android.os.Bundle
import android.view.View
import android.view.ViewGroup.MarginLayoutParams
import androidx.core.content.FileProvider
import androidx.core.view.WindowCompat
import androidx.core.view.drawToBitmap
import androidx.core.view.updateLayoutParams
import androidx.lifecycle.lifecycleScope
Expand Down Expand Up @@ -78,10 +79,7 @@ class MarketShareActivity : BaseActivity() {
binding.container.background = BitmapDrawable(resources, it.blurBitmap(25))
})
}
window.decorView.systemUiVisibility = (
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
)
WindowCompat.setDecorFitsSystemWindows(window, false)
SystemUIManager.setSafePadding(window, android.graphics.Color.TRANSPARENT)
binding.test.round(8.dp)
binding.content.updateLayoutParams<MarginLayoutParams> {
Expand Down
14 changes: 3 additions & 11 deletions app/src/main/java/one/mixin/android/ui/web/WebFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ class WebFragment : BaseFragment() {

private var customView: View? = null
private var customViewCallback: WebChromeClient.CustomViewCallback? = null
private var originalSystemUiVisibility = 0

@SuppressLint("SetJavaScriptEnabled")
private fun initView() {
Expand Down Expand Up @@ -605,20 +604,13 @@ class WebFragment : BaseFragment() {
}
customView = view
customViewCallback = callback
originalSystemUiVisibility = requireActivity().window.decorView.systemUiVisibility

binding.customViewContainer.addView(view)
binding.customViewContainer.isVisible = true
binding.webLl.isVisible = false
binding.webControl.isVisible = false

requireActivity().window.decorView.systemUiVisibility =
View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or
View.SYSTEM_UI_FLAG_FULLSCREEN or
View.SYSTEM_UI_FLAG_IMMERSIVE
SystemUIManager.hideSystemUI(requireActivity().window)
requireActivity().requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
}

Expand All @@ -636,7 +628,7 @@ class WebFragment : BaseFragment() {

customView = null

requireActivity().window.decorView.systemUiVisibility = originalSystemUiVisibility
SystemUIManager.showSystemUI(requireActivity().window)
requireActivity().requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT

customViewCallback?.onCustomViewHidden()
Expand Down Expand Up @@ -1285,7 +1277,7 @@ class WebFragment : BaseFragment() {
binding.webLl.removeView(webView)
processor.close()
if (requireActivity().requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
requireActivity().window.decorView.systemUiVisibility = originalSystemUiVisibility
SystemUIManager.showSystemUI(requireActivity().window)
requireActivity().requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
}
super.onDestroyView()
Expand Down
Loading