How to properly set line height for Android?

前端 未结 6 1336
礼貌的吻别
礼貌的吻别 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:49

    I always do the things programmatically :

    float spc = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,6,r.getDisplayMetrics());
    textView.setLineSpacing(spc, 1.5f);
    

    Also, read the material design guideline about typography. This is really helpful for achiving the best look.

提交回复
热议问题