原文来自:你我学习网: 链接地址:http://www.niwoxuexi.com/blog/android/article/222.html
Android系统中TextView默认显示中文时会比较紧凑,不是很美观。为了让每行保持一定的行间距,
可以设置属性android:lineSpacingExtra或android:lineSpacingMultiplier。
关于Android下TextView中文换行问题,可查看Android自定义view-文本自动换行。
1、android:lineSpacingExtra
设置行间距,如”4dp”。
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="欢迎来到你我学习网-www.niwoxuexi.com"
android:textSize="14sp"
android:lineSpacingExtra="4dp" />
2、android:lineSpacingMultiplier
设置行间距的倍数,如”1.2″。
例如:
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="欢迎来到你我学习网-www.niwoxuexi.com"
android:textSize="14sp"
android:lineSpacingMultiplier="1.2"/>

更多相关文章

  1. Android设置TextView的行间距、行高。
  2. Android2.2 API 中文文档系列(3) —— AccessibilityService
  3. android中文件IO
  4. Android7.0中文API---ImageButton
  5. Android7.0中文API -- SeekBar
  6. Android7.0中文文档(API)-- RemoteViews
  7. Android 中文 API (16) —— AnalogClock
  8. Android API中文文档(111) —— MailTo
  9. Android TextView行间距解析

随机推荐

  1. MySQL5.6解压版服务无法启动之系统错误10
  2. MySQL InnoDB MRR优化指南
  3. MySQL索引不会被用到的情况汇总
  4. MySQL性能优化神器Explain的基本使用分析
  5. CentOS 安装redis和MySQL
  6. 简单谈谈MySQL数据透视表
  7. MySQL中USING 和 HAVING 用法实例简析
  8. MYSQL数据库表结构优化方法详解
  9. SSM实现mysql数据库账号密码密文登录功能
  10. mysql定时任务(event事件)实现详解