Skip to content

Here you will find all the jetpack compose related latest update and your problems solutions related to Jetpack compose

Notifications You must be signed in to change notification settings

SatnamPC/Jetpack_compose_related_updates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Steps to solve status baar issue in android device API 35

  1. Add enableEdgeToEdge with status bar style.

    enableEdgeToEdge(
             statusBarStyle = SystemBarStyle.dark(
                 scrim = Color.Red.toArgb()
             )
         )
    
  2. Change target sdk from 35 to 34, but compile sdk will be the same 35.

    android {
     namespace = "com.cutech.changestatusbarcolor"
     compileSdk = 35
     defaultConfig {
         applicationId = "com.cutech.changestatusbarcolor"
         minSdk = 24
         targetSdk = 34
         versionCode = 1
         versionName = "1.0"
         testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
        }
    }
    
    
  3. If you still face issues with the toolbar, such as shrinking or collapsing, then just add the code below to the toolbar.

CenterAlignedTopAppBar(
   modifier = Modifier.windowInsetsPadding(WindowInsets.systemBars).fillMaxWidth(),
   title = { Text(text = "Toolbar", color = Color.White) },
   colors = TopAppBarDefaults.topAppBarColors(containerColor = Color.DarkGray)
)

If you are satisfied with our solution, then please share it with others as well.

Before fixing the issue :

beforefixstatusbarissue

After fixing the issue :

afterfixstatusbarissue

About

Here you will find all the jetpack compose related latest update and your problems solutions related to Jetpack compose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published