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

How to set state for Bottomsheet fullscreen #15

Open
minhson95th opened this issue Jan 9, 2024 · 3 comments
Open

How to set state for Bottomsheet fullscreen #15

minhson95th opened this issue Jan 9, 2024 · 3 comments

Comments

@minhson95th
Copy link

I try to set state of Bottomsheet to fullscreen by set steps = height of screen of device

        var heightScreen = Screen.mainScreen.heightDIPs
        setTimeout(() => {
            let actionBarHeight = evt.object.getActualSize().height
            var height = heightScreen - actionBarHeight
            console.log('heightScreen: ' + heightScreen); //640
            console.log('actionBarHeight: ' + actionBarHeight); //56
            console.log('height: ' + height); //584

            if (isIOS) {
                let bottomSafeArea = application.ios.window.safeAreaInsets.bottom
                height= height - bottomSafeArea - 25
            }
            this.appService.bottomSheetSteps = [75, height / 2, height]
        }, 200);

But bottomSheet show unexpected. I have try in Samsung Galaxy S6 and Pixel 2 Emulator

Expected:

@farfromrefug
Copy link
Member

@minhson95th you cant doing that way. The reason is that the persistent bottomsheet is added to the child view beneath the actionbar. So it will never go on top of it.
For that you need a custom actionbar and add the bottomsheet to the parent of the actionbar

@minhson95th
Copy link
Author

minhson95th commented Jan 10, 2024

No, i don't want bottomsheet on top of action bar, i mean how to calculate height of bottomshet from below of actionbar to down for all device, i want to set steps of bottomsheet look like picture

@farfromrefug
Copy link
Member

@minhson95th you either use the getMeasuredHeight of the parent use Device.mainScreen.heightDips and removes status bar, action bar, navigation bar...
BTW you should ask that kind of question on Discord, more people could be able to help as it is not a question related to the plugin itself but more to N

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