Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Overlay doesn't work #320

Open
jgalianoz opened this issue May 16, 2024 · 1 comment
Open

Android Overlay doesn't work #320

jgalianoz opened this issue May 16, 2024 · 1 comment

Comments

@jgalianoz
Copy link

jgalianoz commented May 16, 2024

Current Behavior
The overlay is not working correctly on some Android devices, with incorrect positioning. On iOS, everything works perfectly.

Input Code

  • REPL or Repo link if applicable:
<CopilotProvider
                androidStatusBarVisible={Platform.OS === 'android'}
                backdropColor={color.lightDarkBlack}
                tooltipStyle={NativeStyles.tooltip}
                tooltipComponent={TutorialTooltip}
                stepNumberComponent={() => null}
                arrowStyle={NativeStyles.arrow}
                animated={false}
              >
                <StatusBar style="auto" translucent />
                <Navigation />
              </CopilotProvider>

Expected behavior/code
A clear and concise description of what you expected to happen (or code).

Environment

  • Device: Google Pixel 5a - 2400 × 1080 px | 415ppi | 20:9 aspect | 6.34” diagonal
  • react-native-copilot: 3.3.2
  • react-native: 0.72.5
  • react-native-svg: 14.1.0

Possible Solution

Additional context/Screenshots
image
image

@brien-crean
Copy link

brien-crean commented Jun 15, 2024

I also had this issue on Android and solved it by passing the current height of the StatusBar as the verticalOffset. I am not currently working on an iOS app so you may want to pass 0 if Platform.OS === 'ios'.

import { StatusBar } from 'react-native';
import { CopilotProvider } from 'react-native-copilot';

<CopilotProvider
    overlay="svg"
    verticalOffset={StatusBar.currentHeight}
  >
  {children}
</CopilotProvider>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants