简体   繁体   中英

Android: How to flip or rotate unicode character dynamically

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)

在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM