Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add property css text-align justify #9573

Merged
merged 10 commits into from Sep 28, 2021
Merged

feat: add property css text-align justify #9573

merged 10 commits into from Sep 28, 2021

Conversation

@vallemar
Copy link
Contributor

@vallemar vallemar commented Sep 24, 2021

PR Checklist

What is the current behavior?

Now the text-align: justify property is not supported

What is the new behavior?

Now it supports the property, in android it is supported since version 8

Implements: #2614
PR doc: NativeScript/docs-new#39

@farfromrefug
Copy link
Collaborator

@farfromrefug farfromrefug commented Sep 24, 2021

@vallemar awesome PR thank you!

Copy link
Member

@rigor789 rigor789 left a comment

LGTM! 🔥

case 'justify':
// android.os.Build.VERSION_CODES.O
if (android.os.Build.VERSION.SDK_INT >= 25) {
this.nativeTextViewProtected.setJustificationMode(android.text.Layout.JUSTIFICATION_MODE_INTER_WORD);
Copy link
Collaborator

@farfromrefug farfromrefug Sep 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to handle the cas when you change back from justify and thus call this.nativeTextViewProtected.setJustificationMode(android.text.Layout.JUSTIFICATION_MODE_NONE);

Copy link
Contributor Author

@vallemar vallemar Sep 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! changed code

@NathanWalker NathanWalker changed the title feat: add property css text-aling justify feat: add property css text-align justify Sep 28, 2021
@NathanWalker NathanWalker merged commit 1de5295 into NativeScript:master Sep 28, 2021
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants