You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using <Incubator.Toast>, it uses <View useSafeArea>, but our toast still appears behind notch/camera on Android
Related to
Components
Demo
Docs
Typings
Steps to reproduce
Render a Toast (from Incubator) on the root View on an Android device with a notch or
Render a <View useSafeArea></View> on the root View of an Android device with a notch
Expected behavior
It renders under the notch
Actual behavior
It renders behind the notch
More Info
What works for us is this, but feels hacky.
import{useSafeAreaInsets}from'react-native-safe-area-context';import{ToastasRNUIToast,ToastProps}from'react-native-ui-lib/src/incubator';import{isAndroid}from'../util/general';exportfunctionToast(props: ToastProps){constinsets=useSafeAreaInsets();// ? We add the style because the useSafeArea is not working on Androidreturn<RNUIToast{...props}style={isAndroid &&{marginTop: insets.top}}/>;
}
Environment
React Native version: 0.73.6
React Native UI Lib version: 7.23.2
Affected platforms
Android
iOS
Web
The text was updated successfully, but these errors were encountered:
Description
When using <Incubator.Toast>, it uses
<View useSafeArea>
, but our toast still appears behind notch/camera on AndroidRelated to
Steps to reproduce
Render a Toast (from Incubator) on the root View on an Android device with a notch
or
Render a
<View useSafeArea></View>
on the root View of an Android device with a notchExpected behavior
It renders under the notch
Actual behavior
It renders behind the notch
More Info
What works for us is this, but feels hacky.
Environment
Affected platforms
The text was updated successfully, but these errors were encountered: