RTL is forced in RTL devices

£可爱£侵袭症+ 提交于 2019-12-02 18:06:18
atlanteh

I managed to fix this by adding to MainApplication.java:

import com.facebook.react.modules.i18nmanager.I18nUtil;

public class MainApplication extends Application implements ReactApplication {
    @Override
    public void onCreate() {
        super.onCreate();

        // FORCE LTR
        I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance();
        sharedI18nUtilInstance.allowRTL(getApplicationContext(), false);
        ....
    }
}

In manifest.xml file add android:supportsRtl="false" to your application tag

if you are using Expo

import { I18nManager} from 'react-native';
I18nManager.allowRTL(false);

export default class <className> extends Component {



}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!