gpt4 book ai didi

android - 日本字符在 Android TextView 和按钮中显示奇怪的间距

转载 作者:太空狗 更新时间:2023-10-29 14:32:30 29 4
gpt4 key购买 nike

我正在尝试将 Android 应用程序本地化为日语。我放入了日文字符串 xml 文件,除了带有两个小破折号或右上角的小圆圈的片假名字符外,一切都很好。对于这些字符,显示占用 2 个完整字符的宽度。

这是一个简单的例子,显示了片假名中单词“website”的间距问题:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="ウェブサイト"
android:typeface="normal"/>
</LinearLayout>

当它显示在手机上时,第 3 个字符会占用额外的空间。知道出了什么问题吗?

最佳答案

尝试改变字符“Bu”->“Bu”。
第 3 个字符在 UTF-8 中不使用普通日语。

关于android - 日本字符在 Android TextView 和按钮中显示奇怪的间距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5083686/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com