Android Question Draggable card from Bottom

AndroidMadhu

Active Member
Licensed User
Hello ,
I am trying to create Draggable card/Panel from Bottom.
Could you please advice should I use B4xDrawer? But while using B4xDrawer, I am not able to found any properties to open the drawer from Bottom.
Also please advice any link or code snippet to develop the same.
I am using the below link for custombottomsheet....
https://www.b4x.com/android/forum/threads/custombottomsheet-b4a-library-source-code.86121/#content

But the same is clashing with B4xDrawer. That is why I am trying to develop new Draggable card from Bottom for use on my own.

Please advice.

Thanks
 

AndroidMadhu

Active Member
Licensed User
[B4X] [XUI] AS Draggable Bottom Card by @Alexander Stolte
Thanks for the Links. This reference I have already used. But not what I wanted.
I am following the below link from Erel...
https://www.b4x.com/android/forum/threads/bottom-popup-drawer.111706/#content

Only I wanted to drag from the button and It will not hide totally. Only I wanted a portion will visible upon Activity create.
B4X:
Sub OpenDrawer(flg As Boolean)
Dim Duration As Int = 100
OverlayVisible = flg'Not(OverlayVisible)
Overlay.SetVisibleAnimated(Duration, OverlayVisible)
Dim pnlBottomVisibleHeight As Int = pnlBottom.Height - 8dip 'hide bottom round corners
If OverlayVisible Then
pnlBottom.SetLayoutAnimated(0, 0, pnlBottom.Parent.Height, pnlBottom.Width, pnlBottom.Height)   <---- Not able to understand this line
pnlBottom.SetLayoutAnimated(Duration, 0, pnlBottom.Parent.Height - pnlBottomVisibleHeight, pnlBottom.Width, pnlBottom.Height)
Else
pnlBottom.SetLayoutAnimated(0, 0, pnlBottom.Parent.Height - pnlBottomVisibleHeight, pnlBottom.Width, pnlBottom.Height) <---- Not able to understand this line
pnlBottom.SetLayoutAnimated(Duration, 0, pnlBottom.Parent.Height, pnlBottom.Width, pnlBottom.Height)
End If
End Sub

Please advice....
 
Upvote 0
Top