Comments (4)
Can you give some use cases for either of these?
from bottomsheet.
Sure. In my case I'm extending bottom sheet to make a shopping cart.
When an item is added, the cart slides up into "peek". This basically is a list view. I've extended the peek size to either be the height of this product list or the maximum size that would be found if the view was expanded. Conversely, the product scrollview also sizes itself to the maximum size of the parent view too.
The end result is a a scroll list of products. When drag the view into an "expanded" state the payment methods from your account are revealed below and you've moved into checkout mode. If you drag back down you move back into cart mode. If you dismiss the view you're back into buy mode.
So in my case, I need to have a similar action to expanded. Where while in peeked if you drag up or down, it passes that event to the sheet unless the sheet isn't scrollable, upon which it then drags the bottomSheetView into expanded or hidden states.
This is a very cool library and I think it would also be very handy to further add a dynamic element to attach it to any side. I could see uses with top-down peeks as well as left or right peeks.
Again, thanks for the open source.
from bottomsheet.
This wouldn't really work with how the library works. When the bottom sheet is created, its height is actually the same as the parent. This creates an issue where if you wanted to scroll the list in its peeked state, the bottom n items of the list would conceivably never be visible in the peeked portion, since they're considered visible in the context of the whole sheet itself. The sheet isn't really expanding when you pull it up, rather you're just translating it up from off-screen.
A potential work around for this would maybe be to allow for scrolling until it hits the bottom, and then continuing the scroll by translating the sheet up. I think this behavior would be weird and not exactly obvious, so I don't think it's something we want to figure out just for a niche use case. You'd probably be better off extending BottomSheetLayout
and implementing this behavior yourself.
I think it would also be very handy to further add a dynamic element to attach it to any side
There's something for that in the material spec and support library already. It's called the Navigation Drawer ;)
from bottomsheet.
Going to close this for now, we can revisit if more people express an interest.
from bottomsheet.
Related Issues (20)
- find crash
- BottomSheet appears in center of page
- Access Buttons in the Bottomsheet
- how to set different style for different status menu item in MenuSheet
- FloatingActionButton overlaps bottomsheet
- There is no way of knowing if the BottomSheet is dismissing HOT 2
- Efficiency vs Google's standard bottom? HOT 1
- Adding All Social Media
- Any scroll-down-picker won't work with bottom sheet
- Have problems with UnityPlayerActivity
- Rounded Corners HOT 1
- MenuSheetView icon
- Bug in height size after expanded list
- BottomSheetFragment expands by himself when I remove elements from the view.
- The width of the bottomsheet on the flat panel device can not occupy the pan
- Can't build project
- Bug: bottom sheet looks almost non-existing when on landscape HOT 1
- Dialog shadow is not appearing in front of status bar.
- java.lang.NullPointerException RecycyclerView
- XPopup is better! https://github.com/li-xiaojun/XPopup
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bottomsheet.