Git Product home page Git Product logo

Comments (5)

skydoves avatar skydoves commented on June 19, 2024 1

All those properties that are placed inside the rememberFlexibleBottomSheetState can't be dynamically changed.

You can also change the visibility of your bottom sheet by giving the alpha modifier function like the code below:

FlexibleBottomSheet(
    modifier = Modifier.alpha(1.0f),
    ..

I'm closing this issue. If you still face any other issues, please share them with me. Thanks!

from flexiblebottomsheet.

skydoves avatar skydoves commented on June 19, 2024

Hey @Sandeep03edu, the example you shared with me is quite confusing. Would you elaborate on this?

If you want to still interact with the background content when your bottom sheet is visible (non-modal), you should give isModal as false.

from flexiblebottomsheet.

Sandeep03edu avatar Sandeep03edu commented on June 19, 2024

@skydoves I am making the bottom sheet visible when composable is open for the first time, that's why I set the isModal as true.
Now, when the user drags down the sheet and make sheet hidden, I want the user to interact with the background composable, i.e., the isModal should be false.

I am implementing the same feature as Instagram's post share button menu
When the user clicks the share button a bottom sheet menu opens, and user can't interact with background content, But when the sheet is dismissed user can interact with background content.

from flexiblebottomsheet.

skydoves avatar skydoves commented on June 19, 2024

I guess you mean this kind of implementation.

  var isShowing by remember { mutableStateOf(true) }
  
  if (isShowing) {
    FlexibleBottomSheet(
      onDismissRequest = {
        isShowing = false
      },
      sheetState = rememberFlexibleBottomSheetState(isModal = true),
    ) {
      Text(text = "Bottom Sheeeet!!!")
    }
  }

from flexiblebottomsheet.

Sandeep03edu avatar Sandeep03edu commented on June 19, 2024

Thanks @skydoves it worked, But I wonder why the sheetState's isModal was not updated in my method?
Also, It would be good if the sheet itself had an option to set visibility.

from flexiblebottomsheet.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.