Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Android align-text bug with Arabic characters #6051

Open
@hamzahio

Description

@hamzahio

Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo? Yes

Tell us about the problem

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.

xml

<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="onNavigatingTo" class="page">
    <Page.actionBar>
        <ActionBar title="My App" icon="" class="action-bar">
        </ActionBar>
    </Page.actionBar>
    <StackLayout>
			<Label text="this sholud be right" class="text"/>
			<Label text="اضغط هنا" class="text"/>
			<Label text="Tap the button left" class="text2"/>
			<Label text="اضغط هنا" class="text2"/>
    </StackLayout>
</Page>

css

.text {
  text-align: right;
}

.text2 {
  text-align: left;
}

Image of Yaktocat


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions