nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
219 stars 80 forks source link

bottomsheet add a position. slightly slightly ajar (100 dp) approximately. #306

Closed Bezlepkin closed 3 years ago

Bezlepkin commented 3 years ago

Now the bottomsheet opens approximately in the middle of the screen. When you swipe down, it closes. Is it possible to add another position, approximately 100 meters high. That is, what would have turned out to be three positions: in the middle, full screen, and a slightly open position.

farfromrefug commented 3 years ago

@Bezlepkin i dont understand what you are talking about? Please give more information when you open an issue.

Bezlepkin commented 3 years ago

So that you can open it:

ezgif-7-b438f4a0116b

farfromrefug commented 3 years ago

@Bezlepkin seems nice. I wont implement it until i need it. Sorry a lot to do / maintain. But if you want to have a go at it would love to have a PR :D

Bezlepkin commented 3 years ago

@Bezlepkin seems nice. I wont implement it until i need it. Sorry a lot to do / maintain. But if you want to have a go at it would love to have a PR :D

I would love to! But where to start? :)

farfromrefug commented 3 years ago

@Bezlepkin first look at the native APIs to see how they handle it. Then try to find an API which would work for bot platforms then implement and test it

Bezlepkin commented 3 years ago

first look at the native APIs to see how they handle it. Then try to find an API which would work for bot platforms then implement and test it

For this implementation, i don't need to add code to Java Android?

farfromrefug commented 3 years ago

@Bezlepkin there is no java code. It is all handled from the JS side (but still calling java code)

vallemar commented 3 years ago

I have been interested in this behavior, in android it is very easy since it lets you indicate at the height that you want to open the bottomshet, in iOS I have no idea but I will try to take some time to investigate as well

vallemar commented 3 years ago

@Bezlepkin I have it working in android but in ios I don't get it. have you been able to see any of this?

Bezlepkin commented 3 years ago

I have it working in android but in ios I don't get it. have you been able to see any of this?

No! How are you do it for Android?

vallemar commented 3 years ago

Sorry @Bezlepkin, here you can see how to add this functionality only for android, the other options are not checked, only the default height that the developer wants. Repo. in ios I tried, but I did not get it :(

vallemar commented 3 years ago

@farfromrefug I have been able to add this functionality for android here, but for ios it does not work: here. According to the documentation it should do that, I suspect that it is related to this method but I would not know how to do it. Do you know a "quick" way to implement this?

farfromrefug commented 3 years ago

@vallemar not sure you can use the property to set it in N on iOS. Try to use setPrefered... Also if you make a PR i am not sure about the name collapsedHeight i would prefer we use the name used on iOS or android

vallemar commented 3 years ago

Además, si hace un PR, no estoy seguro del nombre collapsedHeight, preferiría que usemos el nombre que se usa en iOS o Android

Perfect, I would stick with the iOS one. I will not do the PR until I find a solution for iOS. Thanks! @Bezlepkin Have you been able to take a look at this?

farfromrefug commented 3 years ago

@Bezlepkin @vallemar just released 6.0.2 with support for peekHeight on iOS/Android. Thanks @vallemar for your PR!

vallemar commented 3 years ago

@Bezlepkin can you close this issue?