You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android align-text bug with Arabic characters #6051
Problem with Text alignment in Android if Label given text-align: right; and the text is LTR it works ok but when text is RTL for example Arabic text goes to the other way.
Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
CLI: (run tns --version to fetch it)
Cross-platform modules: (check the 'version' attribute in the node_modules/tns-core-modules/package.json file in your project)
Runtime(s): (look for the "tns-android" and "tns-ios" properties in the package.json file of your project)
Plugin(s): (look for the version number in the package.json file of your
project)
Please tell us how to recreate the issue in as much detail as possible.
The best approach would be to get your code running in the NativeScript Playground and share the link with us, along with any additional details or steps to reproduce needed for examining the issue there.
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
HI @hamzahio,
Thank you for the provided sample code.
Indeed there is an issue with the setting up the text alignment. We will research the problem further. Currently, I would suggest keeping track of the issue for more info.
Activity
tsonevn commentedon Jul 11, 2018
HI @hamzahio,
Thank you for the provided sample code.
Indeed there is an issue with the setting up the text alignment. We will research the problem further. Currently, I would suggest keeping track of the issue for more info.
hamzahio commentedon Jul 11, 2018
@tsonevn thanks for your response I think android does this for RTL languages so they automatically change the alignment for RTL languages.
Is there any dirty fix because my app will launch in production today.
tsonevn commentedon Jul 12, 2018
Hi @hamzahio,
As a temporary solution, you can setup platform specific CSS as follows:
This should help you in specifying the correct alignment for the text.
hamzahio commentedon Jul 12, 2018
@tsonevn correct but I didn't know the language of data I got from server so the label will be
tsonevn commentedon Jul 13, 2018
HI @hamzahio,
You can try to set up the
horizontalAlignmentto the main layout and remove the text-align property from the labels. For example:XML
For your convinience I am also attaching sample project.
Archive.zip
TowelDude commentedon Nov 29, 2018
This is no fix...
Its just a patch, please fix it..