File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,16 @@ export class Label extends LabelBase {
421
421
422
422
[ textAlignmentProperty . setNative ] ( value : CoreTypes . TextAlignmentType ) {
423
423
const view = this . nativeTextViewProtected ;
424
- view . setGravity ( getHorizontalGravity ( value ) | getVerticalGravity ( this . verticalTextAlignment ) ) ;
424
+ if ( android . os . Build . VERSION . SDK_INT >= 25 ) {
425
+ if ( ( value as any ) === 'justify' && android . os . Build . VERSION . SDK_INT >= 25 ) {
426
+ view . setJustificationMode ( android . text . Layout . JUSTIFICATION_MODE_INTER_WORD ) ;
427
+ } else {
428
+ view . setJustificationMode ( android . text . Layout . JUSTIFICATION_MODE_NONE ) ;
429
+ view . setGravity ( getHorizontalGravity ( value ) | getVerticalGravity ( this . verticalTextAlignment ) ) ;
430
+ }
431
+ } else {
432
+ view . setGravity ( getHorizontalGravity ( value ) | getVerticalGravity ( this . verticalTextAlignment ) ) ;
433
+ }
425
434
}
426
435
427
436
[ colorProperty . setNative ] ( value : Color | string ) {
You can’t perform that action at this time.
0 commit comments