'supportingText' overflowing parent in Jetpack Compose Edit Text

80 Views Asked by At

I have an EditText in my Composable function that have a supportingText defined as follow:

supportingText = ui.emailError?.let {
   {
      Text(
         text = it,
         color = MaterialTheme.colorScheme.error
      )
   }
},

The results though are not what I expect it to be: enter image description here

Layout Inspector: enter image description here

The Text composable has a padding at the start, and overflows its parent, any idea why?

I'm using: compose-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "compose-material3" } with 1.1.2 as compose-material3 version.

1

There are 1 best solutions below

1
BenjyTec On BEST ANSWER

The behaviour you are observing is a bug that was reported in the Google Issue Tracker.

The issue was marked as fixed and should be resolved by using Material3 library version 1.2.0-alpha02 or above.

implementation 'androidx.compose.material3:material3:1.2.0-alpha02'
implementation 'androidx.compose.material3:material3-android:1.2.0-alpha02'