8

I'm developing with jetpack compose. When I use includePadding = false, in compose, the feature is used like below

platformStyle = PlatformTextStyle(includeFontPadding = false)

But the jetpack compose docs say like below,

includeFontPadding was added to Android in order to prevent clipping issues on tall scripts. 
However that issue has been fixed since Android 28. 
Jetpack Compose backports the fix for Android versions prior to Android 28. 
Therefore the original reason why includeFontPadding was needed in invalid on Compose.
This configuration was added for migration of the apps in case some code or 
design was relying includeFontPadding=true behavior and will be removed

As above mentioned, I'm confused with whether to use includePadding. Is there other way to use includePadding = false or Is it not recommended to use includePadding = false?

jakchang
  • 402
  • 5
  • 13
  • The doc says everything . the clipping was fixed a while ago https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0-alpha05 . – ADM Jul 27 '22 at 08:58
  • 5
    @ADM Nope, in 1.2.0-beta01 in is turned ON by default again. https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0-beta01 PlatformTextStyle, however, id marked as deprecated - and it is really confusing. – cVoronin Aug 25 '22 at 12:35
  • @ADM fixed what exactly? see the example https://stackoverflow.com/questions/75832996/jetpack-compose-platformtextstyle-includefontpadding-is-deprecated-so-what-is-t – user924 Mar 24 '23 at 11:30
  • Is confusing for me as well, I need to remove the padding included by default, my implementation has nothing to do with the coment and the deprecation coment also don't tell what should we use instead – Felipe Andrade Jun 07 '23 at 10:49

0 Answers0