gpt4 book ai didi

android - 如何在EditText中将阿拉伯文本加英文文本从右到左

转载 作者:太空狗 更新时间:2023-10-29 15:28:17 25 4
gpt4 key购买 nike

我在 EditText 中设置下面的文本作为提示

مرحبا هذا هو الاختبار. Test

但是显示如下

Test مرحبا هذا هو الاختبار.

我想设置提示,因为我在提示中给出了字符串。

      <EditText
android:id="@+id/username"
android:layout_width="0dip"
android:layout_height="48dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:focusable="true"
android:lines="1"
android:hint="مرحبا هذا هو الاختبار. Test"
android:singleLine="true"
android:textColor="#000000"
android:textSize="18sp" />

最佳答案

你可以只在你的字符串的第一个添加 "\u200F"

var text = "\u200F"+ "测试"+ "آ₩

关于android - 如何在EditText中将阿拉伯文本加英文文本从右到左,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25286929/

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