Filip Wiesner
05/22/2023, 12:46 PMFilip Wiesner
05/22/2023, 12:46 PMRohan Maity
05/22/2023, 12:52 PMFilip Wiesner
05/22/2023, 12:58 PMits own constrained areaWhat do you mean? 🤔 If you’re referring to the minimum touch target size, it should be disabled using the CompositionLocalProvider, as seen in the image. There is nothing more to show. It's just a test composable with a Box wrapper
Rohan Maity
05/22/2023, 1:05 PMWhen the size of a clickable composable is smaller than the minimum touch target size, Compose still increases the touch target size. It does so by expanding the touch target size outside of the boundaries of the composable.
Filip Wiesner
05/22/2023, 1:06 PMRohan Maity
05/22/2023, 1:07 PMRohan Maity
05/22/2023, 1:07 PMFilip Wiesner
05/22/2023, 1:10 PMFilip Wiesner
05/22/2023, 1:12 PMRohan Maity
05/22/2023, 1:17 PMvide
05/22/2023, 1:27 PMLocalMinimumTouchTargetEnforcement
only applies for Material components.vide
05/22/2023, 1:28 PMLocalViewConfiguration.current.minimumTouchTargetSize
that applies globallyvide
05/22/2023, 1:30 PMval viewConfiguration: ViewConfiguration = LocalViewConfiguration.current
val minTouchViewConfiguration = object : ViewConfiguration by viewConfiguration {
override val minimumTouchTargetSize = DpSize(...)
}
CompositionLocalProvider(LocalViewConfiguration provides minTouchViewConfiguration) {
...
}
Rohan Maity
05/22/2023, 1:38 PMvide
05/22/2023, 1:43 PMFilip Wiesner
05/22/2023, 1:56 PMvide
05/22/2023, 1:57 PMvide
05/22/2023, 1:57 PMFilip Wiesner
05/22/2023, 2:18 PMThe material library does use the ViewConfiguration provided value for their implementationI see the
minimumInteractiveComponentSize
defined in material package as DpSize(48.dp, 48.dp)
.Louis Pullen-Freilich [G]
05/22/2023, 11:55 PMvide
05/23/2023, 6:01 AMLocalViewConfiguration.current.minimumTouchTargetSize
in Material 1.3.1Rohan Maity
05/23/2023, 6:44 AMFilip Wiesner
05/23/2023, 7:25 AMStylianos Gakis
05/23/2023, 8:36 AMI can tell the designer to reconsider those stupid tiny interactive surfacesDoes your designer hate your users? Do they want them to become frustrated as they try to click little tiny things? I really would push back incredibly hard against such a touch target. 20dps is incredibly small ☠️
Filip Wiesner
05/23/2023, 9:01 AMStylianos Gakis
05/23/2023, 9:01 AMStylianos Gakis
05/23/2023, 9:02 AMRohan Maity
05/23/2023, 9:02 AMFilip Wiesner
05/23/2023, 9:05 AMStylianos Gakis
05/23/2023, 9:16 AMFilip Wiesner
05/23/2023, 9:19 AM