英文:
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)
Expected result (Hebrew)
Current result (Hebrew)
答案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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论