rn-tourguide icon indicating copy to clipboard operation
rn-tourguide copied to clipboard

Background mask not taking full height in android

Open ShivamJoker opened this issue 4 years ago • 15 comments
trafficstars

As you can see in the image there is some space left in the bottom.

image

These are providers I am using

const App = () => (
  <ColorSchemeProvider>
    <BottomSheetModalProvider>
      <SafeAreaProvider>
        <TourGuideProvider
          androidStatusBarVisible={true}
          animationDuration={250}>
          <StatusBar
            barStyle="dark-content"
            backgroundColor="#c8b900"
            translucent
          />
          <AppContent />
        </TourGuideProvider>
      </SafeAreaProvider>
    </BottomSheetModalProvider>
  </ColorSchemeProvider>
);

Full code can be seen here - https://github.com/ShivamJoker/SQL-Play/blob/d409f4b0c06323c022ed99a6e5384c0ff66d4a83/src/component/App.tsx#L205

ShivamJoker avatar Apr 29 '21 09:04 ShivamJoker

I'm also facing the same issue.. did you find any fix? @ShivamJoker

Md-Mudassir avatar May 19 '21 06:05 Md-Mudassir

@Md-Mudassir no, this library seems unmaintained

ShivamJoker avatar May 19 '21 06:05 ShivamJoker

@Md-Mudassir no, this library seems unmaintained

https://github.com/xcarpentier/rn-tourguide/blob/c22e6c339871f1bc67e858c0c140212f478b9658/src/components/SvgMask.tsx#L42 I change this code and full screen const FIRST_PATH = M0,0H${screenDimensions.width}V${ screenDimensions.height + StatusBar.currentHeight}H0V0ZM${screenDimensions.width / 2},${ screenDimensions.height / 2} h 1 v 1 h -1 Z

i-kelly avatar Jun 16 '21 08:06 i-kelly

@Md-Mudassir no, this library seems unmaintained

https://github.com/xcarpentier/rn-tourguide/blob/c22e6c339871f1bc67e858c0c140212f478b9658/src/components/SvgMask.tsx#L42

I change this code and full screen const FIRST_PATH = M0,0H${screenDimensions.width}V${ screenDimensions.height + StatusBar.currentHeight}H0V0ZM${screenDimensions.width / 2},${ screenDimensions.height / 2} h 1 v 1 h -1 Z

Thank you so much, It worked

Md-Mudassir47 avatar Jun 16 '21 09:06 Md-Mudassir47

@Md-Mudassir no, this library seems unmaintained

https://github.com/xcarpentier/rn-tourguide/blob/c22e6c339871f1bc67e858c0c140212f478b9658/src/components/SvgMask.tsx#L42

I change this code and full screen const FIRST_PATH = M0,0H${screenDimensions.width}V${ screenDimensions.height + StatusBar.currentHeight}H0V0ZM${screenDimensions.width / 2},${ screenDimensions.height / 2} h 1 v 1 h -1 Z

Thank you so much, It worked

I use patch-package library in my project https://github.com/ds300/patch-package

i-kelly avatar Jun 16 '21 09:06 i-kelly

hello the above solution did not work for me in node_modules\rn-tourguide\lib\components\SvgMask.js i changed the window dimensions from 'window' to 'screen' and that fixed the shadow issue .. but the unshaded area is still higher than it should be

DvillamizarM avatar Sep 12 '21 23:09 DvillamizarM

hello the above solution did not work for me in node_modules\rn-tourguide\lib\components\SvgMask.js i changed the window dimensions from 'window' to 'screen' and that fixed the shadow issue .. but the unshaded area is still higher than it should be

Try the below code (replace it here /node_modules/rn-tourguide/lib/components/SvgMask.js) .. for me it worked

const screenDimensions = Dimensions.get('screen')
const FIRST_PATH = `M0,0H${screenDimensions.width}V${screenDimensions.height}H0V0ZM${screenDimensions.width / 2},${screenDimensions.height / 2} h 1 v 1 h -1 Z

Md-Mudassir47 avatar Sep 13 '21 05:09 Md-Mudassir47

hello the above solution did not work for me in node_modules\rn-tourguide\lib\components\SvgMask.js i changed the window dimensions from 'window' to 'screen' and that fixed the shadow issue .. but the unshaded area is still higher than it should be

Same for me

gigeos avatar Oct 27 '21 17:10 gigeos

hello the above solution did not work for me in node_modules\rn-tourguide\lib\components\SvgMask.js i changed the window dimensions from 'window' to 'screen' and that fixed the shadow issue .. but the unshaded area is still higher than it should be

Same for me

What version have you installed? for me it worked in "rn-tourguide": "^2.7.1", try in this version

Md-Mudassir47 avatar Oct 28 '21 03:10 Md-Mudassir47

Same issue for me on Android

spideyinf avatar Dec 10 '21 09:12 spideyinf

I'm having this issue on android, the tabbar is not part of the masked area. In version 3.2.0 this solution is implemented and the issue is still happening.

evanlarkin10 avatar Jan 03 '22 21:01 evanlarkin10

Can someone make an MR of it?

xcarpentier avatar Jan 21 '22 09:01 xcarpentier

For my part, I just add a little timeoutto be sure screen is rendered and now it's well displayed

gigeos avatar Jan 31 '22 10:01 gigeos

A bit of a hack but I just adjust the canvasSize a bit by adding to the calculated screen height height + PX. Works well in both iOS and Android and with both tourguide version 3.2.0 and 2.7.1

this.handleLayout = ({ nativeEvent: { layout: { width, height }, }, }) => {
                this.setState({
                    canvasSize: {
                        x: width,
                        y: height + 125,
                    },
                });
            };

lucidprojects avatar Jun 01 '22 21:06 lucidprojects

Hello,

For my part, i fix the issue to edit :

this.windowDimensions = Dimensions.get('screen'); instead of Dimensions.get('window');

in node_modules/svgMask.js

AGIsam avatar Jun 27 '22 14:06 AGIsam

This has been fixed in October 21 and this issue should be closed.

pke avatar Nov 14 '22 13:11 pke