react native:andorid给iOS的navi多出20像素左右
头部发白了
安卓普遍的navi头都多出来一点,就是statebar多了20像素,一个沉浸式的问题,暂时这样处理,这样iOS和安卓大体就差不多了
package com.qinggu.damai; import android.view.View; import com.facebook.react.ReactActivity; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; import com.imagepicker.ImagePickerPackage; import java.util.Arrays; import java.util.List; public class MainActivity extends ReactActivity { /** * 沉浸式问题处理 */ void stateBartoDo() { getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); } /** * Returns the name of the main component registered from JavaScript. * This is used to schedule rendering of the component. */ @Override protected String getMainComponentName() { stateBartoDo(); return "JdApp"; } /** * Returns whether dev mode should be enabled. * This enables e.g. the dev menu. */ @Override protected boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } /** * A list of packages used by the app. If the app uses additional views * or modules besides the default ones,add more packages here. */ @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(),new ImagePickerPackage() ); } }
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。