How to properly set line height for Android?

前端 未结 6 1354
礼貌的吻别
礼貌的吻别 2020-12-13 03:37

I am a UX architect working with a team of Android developers that are mostly junior. We are having issues properly setting line height in Android.

We are using the

6条回答
  •  旧巷少年郎
    2020-12-13 03:54

    Here's React Native's solution: add a span that adjusts the line height https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLineHeightSpan.java

    My design colleagues use line height excessively and its a pain that it never looks right after rending in-app.

    I'll be planning on making a custom TextView class that takes an arg by XML and will post it here after.

提交回复
热议问题