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

Dyanamic Height for different screens #30

Open
gtkris98 opened this issue Feb 5, 2020 · 0 comments
Open

Dyanamic Height for different screens #30

gtkris98 opened this issue Feb 5, 2020 · 0 comments

Comments

@gtkris98
Copy link

gtkris98 commented Feb 5, 2020

@jacklein
I am using rn-bottom-drawer for drawer implementation for my app. I tried several ways like PixelRatio, ModerateScale, If-else for range of screen height but i am unsuccessful in setting such a containerHeight that it works perfectly with all device screens and there is no space between my drawer and bottom of my screen.

My Code:

<BottomDrawer
        ref={"_drawer"}
        containerHeight={moderateScale(270)}
        startUp={false}
        backgroundColor={null}
        downDisplay={moderateScale(200)}
        onExpanded={() => this.setState({ isRecentSearchesExpanded: true })}
        onCollapsed={() => this.setState({ isRecentSearchesExpanded: false })}>
        <View style={{ width: screenWidth }}>
                <ImageBackground 
                         source={require('../../assets/tabBkgd.png')} 
                         style={{ 
                                height: "100%", 
                                width: screenWidth, 
                                 justifyContent: "center", 
                                 backgroundColor: "transparent" }} 
                         resizeMode="stretch">
                    {/* some views here */}
                </ImageBackground>
         </View>
</BottomDrawer>
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

1 participant