Multiline: textAlign?
Is there a chance to reach textAlign center on Multilines?
Ok, if i change it to ALIGN_CENTER it works :) on Android.
So basicly looking for such a solution for iOS
https://github.com/JimmyDaddy/react-native-image-marker/blob/master/android/src/main/java/com/jimmydaddy/imagemarker/ImageMarkerManager.java#L364
Have you found the solution for text aligning ? Found this solution https://stackoverflow.com/questions/6801856/nsattributedstring-add-text-alignment NSMutableParagraphStyle *paragraphStyle = NSMutableParagraphStyle.new; paragraphStyle.alignment = NSTextAlignmentRight; NSDictionary *attr = @{ NSFontAttributeName: font, //设置å—体 NSForegroundColorAttributeName : color, //设置å—体颜色 NSShadowAttributeName : shadow, NSParagraphStyleAttributeName:paragraphStyle };
Now margin only to fill textBackground in Android. We need to be margin horizontally supported.Just like:
int marginHorizontal = 20; if (position == null && null != X ) { marginHorizontal = X; } // ALIGN_CENTER, ALIGN_NORMAL, ALIGN_OPPOSITE StaticLayout textLayout = new StaticLayout(mark, textPaint, canvas.getWidth() - 2 * marginHorizontal, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
Hope ASAP to support