You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"I need some help. I don't know where to ask questions regarding this. The thing is, I want to view an image in full screen by hiding the navigation and status bars. I used WindowCompat.setDecorFitsSystemWindows(window, false), which started showing content behind the status bar. When I add the flags to hide the status and navigation bars, the content automatically takes margin from the top. I've tried everything available on the internet, but no luck. I can't figure out where I am going wrong. I've been trying this for at least 4 days, and I still haven't had any luck."
This is what i tried but the content is still showing
class MainActivity : ComponentActivity() {
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
setContent {
MyApplicationTheme {
val systemUiController = rememberSystemUiController()
systemUiController.isStatusBarVisible = false // Status bar
systemUiController.isNavigationBarVisible = false // Navigation bar
systemUiController.isSystemBarsVisible = false // Status & Navigation bars
systemUiController.navigationBarDarkContentEnabled = true
// A surface container using the 'background' color from the theme
Box(
modifier = Modifier
.fillMaxSize()
.background(Color.White)
.padding(-10.dp),
) {
Greeting("Android")
}
}
}
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
"I need some help. I don't know where to ask questions regarding this. The thing is, I want to view an image in full screen by hiding the navigation and status bars. I used WindowCompat.setDecorFitsSystemWindows(window, false), which started showing content behind the status bar. When I add the flags to hide the status and navigation bars, the content automatically takes margin from the top. I've tried everything available on the internet, but no luck. I can't figure out where I am going wrong. I've been trying this for at least 4 days, and I still haven't had any luck."
This is what i tried but the content is still showing
Beta Was this translation helpful? Give feedback.
All reactions