如何使TextView字符大小相同?

时间:2021-06-19 14:05:11

I need to show in TextView chars with the same size in pixels, can it be done using a custom font or something like that?

我需要在TextView字符中显示相同大小的像素,是否可以使用自定义字体或类似的东西来完成?

Take for example the char ';' takes 8 pixels in width and a space ' ' takes 7 pixels in width, how can i make those the same size?

比如char';'宽度为8像素,空间宽度为7像素,如何制作相同尺寸的像素?

1 个解决方案

#1


3  

Use

<TextView
    android:typeface="monospace"
    ...
    />

in your TextView

在TextView中

#1


3  

Use

<TextView
    android:typeface="monospace"
    ...
    />

in your TextView

在TextView中