Last active
October 5, 2019 08:45
-
-
Save msarsha/fb007637f4536baa3fad1779eca4d587 to your computer and use it in GitHub Desktop.
Force RTL layout for android and ios in NativeScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android (main.ts): | |
app.android.addEventListener(app.AndroidApplication.activityCreatedEvent, (event: app.AndroidActivityEventData) => { | |
event.activity.getWindow().getDecorView().setLayoutDirection(android.view.View.LAYOUT_DIRECTION_RTL); | |
}); | |
ios (app.component.ts): | |
UIView.appearance().semanticContentAttribute = 4; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For android add:
android:supportsRtl="true"
in AndroidManifest.xml under the aplication tag.