React native RTL on Android

Add this import in MainApplication.java :

import android.os.Bundle; // needed for onCreate method
import com.facebook.react.modules.i18nmanager.I18nUtil;

and add

@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance();
    sharedI18nUtilInstance.allowRTL(getApplicationContext(), true);
}

Add this import in MainActivity.java :

import com.facebook.react.modules.i18nmanager.I18nUtil;
I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance();
sharedI18nUtilInstance.allowRTL(getApplicationContext(), true);

add these line in ReactActivityDelegate

  protected ReactActivityDelegate createReactActivityDelegate() {
            return new ReactActivityDelegate(this, getMainComponentName()) {
      @Override
      protected ReactRootView createRootView() {
          I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance();
          sharedI18nUtilInstance.allowRTL(getApplicationContext(), true);
                       return new RNGestureHandlerEnabledRootView(MainActivity.this);
                      }
    };
          }