adam-codersgu / supernova

A Kotlin-based Android application that allows the user to play music from their device while custom animations fall over the album artwork of the currently playing song.
0 stars 0 forks source link

Attempt to implement a mechanism for closing the currently playing fragment with a pull down motion #4

Closed adam-codersgu closed 1 year ago

adam-codersgu commented 2 years ago

It would be potentially advantageous to be able to close the currently playing fragment via a pull down motion. The transitions between the currently playing fragment and controls fragment would need to be preserved. The pull down motion should also not conflict detrimentally with the animation objects, which are dragable.

Links: https://stackoverflow.com/questions/32873937/how-to-close-a-fragment-on-pulling-up-or-down https://nikoladespotoski.medium.com/new-bottomsheet-caab21aff19b

adam-codersgu commented 1 year ago

Could maybe do something like here: https://github.com/fatihsokmen/pull-to-dismiss/blob/master/pulltodismiss/src/main/java/com/github/fatihsokmen/pulltodismiss/PullDismissLayout.java and when the gesture goes far enough, manually trigger a navigation action (i.e. to still get the widget transition?)

adam-codersgu commented 1 year ago

Working on branch feature/drag-to-close-currently-playing-fragment

adam-codersgu commented 1 year ago

Also need to refactor/streamline the PullToClose class once the feature is working

adam-codersgu commented 1 year ago

Completed and merged https://github.com/adam-codersgu/supernova/pull/21