Giter Club home page Giter Club logo

Comments (3)

markrietveld avatar markrietveld commented on September 26, 2024

Hi @albertogarrido. This library currently doesn't have support for a sheet that is always open. All of the options you mentioned would have problems.

For example: you could get pretty close to what you want by using the second option you mentioned. You can control the darkening of the content and also how it's scaled by using a custom ViewTransformer in the showWithSheetView method. It would still be possible to close the sheet completely though, which is not what you want

If you'd like to open a pull request for changes to support this, we can discuss approaches here

from bottomsheet.

ZacSweers avatar ZacSweers commented on September 26, 2024

@albertogarrido that seems like a similar API to https://github.com/umano/AndroidSlidingUpPanel/

Would love to have a similar implementation for this built into the components module, but not sure about the best approach. As mark said, very open to ideas!

from bottomsheet.

ZacSweers avatar ZacSweers commented on September 26, 2024

So I think it would be possible to do this with a fancy ViewTransformer and a nice API. The "peeked" view would be measured at a maximum height of whatever the layout's peeked height is, with support for inverting control to the component sheet to set the peek height based on the wrap-content height of the collapsed view.

API:

  • View would be a FrameLayout effectively with two child views. Peeked view would have gravity to the top, and expanded view would match parent
  • setPeekedView(View v)
  • setExpandedView(View v)
  • setViewTransformer, where this would be a custom transformer that interpolates between the peeked and expanded views
  • XML attribute support for declaring the view in XML with attributes pointing to the IDs of the peeked and expanded views

from bottomsheet.

Related Issues (20)

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.