【问题标题】:"Dot" present in "i" is not showing in TextView“i”中的“点”未显示在 TextView 中
【发布时间】:2018-05-16 13:20:55
【问题描述】:

我有一个TextView,我需要显示“远离火源”。在这句话中,“dot”没有显示在“i”上方。添加截图以供参考。

并非所有安卓设备都有这种行为

我该如何解决这个问题?

【问题讨论】:

  • 这可能是watch实现的默认字体的bcz。您是否尝试过使用自定义字体?
  • 字符组合“fi”经常被连字替换,其中 i 上的点与 f 融合在一起。这是一项功能,而不是错误。
  • @Henry,你能给我发个参考链接吗?
  • @Henry,非常感谢

标签: android textview


【解决方案1】:

通过将 android:fontFeatureSettings="liga 0" 添加到 TextView 来解决此问题

参考链接:Text with "f" following "i", cannot see the dot on the "i", sans font

【讨论】:

    【解决方案2】:

    试试这个对我有用

    添加 xml:

    <TextView 
    android:id="@+id/textview"
    android:maxLines="1" // or any number of lines you want
    android:ellipsize="end" />
    

    【讨论】:

      猜你喜欢
      • 2018-05-19
      • 1970-01-01
      • 1970-01-01
      • 2020-06-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-01
      相关资源
      最近更新 更多