In my android app I need to create a view that user can slide up and down with finger. Not just slide
up/down with swipe/fling
but slide up/down when finger is held down on screen.
Like Snapchat Memories slide view.
I have tried using BottomSheetDialog
but problem is, I need to keep a peekHeight
in order to swipe as I require it. If I use BottomSheetDialogFragment
and set peekHeight
to 0
then I need to use show()
on FragmentManager
which just leaves me with two options; to set peekHeight
or expand completely.
There is a utility class called ViewDragHelper
. I saw some examples but again, all examples showed the view partially visible in order to drag it up/down.
Is there any way, I could use BottomSheetDialog
or BottomSheetDialogFragment
and create user swipe like snapchat memories.
If ViewDragHelper
can be used could someone provide me with an example where view is completely hidden at beginning? The reference docs are quite confusing.