Android:如何动态翻转或旋转Unicode字符

huangapple go评论84阅读模式
英文:

Android: How to flip or rotate unicode character dynamically

问题

textView.text = getString(R.string.app_settings) + " \u2794 " + getString(R.string.display)

英文:

Due to lack of available unicode symbol, I'm trying to get a unicode arrow to point in the opposite direction dynamically for right-to-left languages, but it's not working. Is there a way that this can be done programmatically only?

textView.text = getString(R.string.app_settings) + " \u2794 " + getString(R.string.display)

Current result (English)

Android:如何动态翻转或旋转Unicode字符

Expected result (Hebrew)

Android:如何动态翻转或旋转Unicode字符

Current result (Hebrew)

Android:如何动态翻转或旋转Unicode字符

答案1

得分: 0

你可以使用 CSS 的 transform 来翻转该符号。
我会将 Unicode 放在一个 span 内,并使用 JavaScript 添加一个包含 transform 函数的类。

英文:

You could use css transform to flip the symbol.
I would put the unicode inside a span and with javascript add a class that has the transform function in it.

huangapple
  • 本文由 发表于 2020年8月17日 05:16:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/63442010.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定