Android Question CustomButtomSheet not working

AndroidMadhu

Active Member
Licensed User
Hello,
I am using CustomButtomSheet tray from button of my App.
The SlidingPanel_Touch() event [Drag from buttom is not working as expected after implementing of b4xdrawer. I am following the below link for CustomButtomSheet.
https://www.b4x.com/android/forum/threads/custombottomsheet-b4a-library-source-code.86121/
The above link was working fine before implementation of b4xdrawer. But now it is not working
The below are the code for B4xdrawer....
B4X:
 #Region   Activity Attributes
#FullScreen: True
#IncludeTitle: False
#End Region
Sub Activity_Create(FirstTime As Boolean)
Private drvMenu As CustomListView
Drawer.Initialize(Me, "Drawer", Activity, 300dip)
Drawer.CenterPanel.LoadLayout("1")
Drawer.LeftPanel.LoadLayout("left")
For i = 1 To 5
drvMenu.AddTextItem("Item " & i,i)
Next
..............


BottomSheet.Initialize(Activity, Me, "Done", LayoutPanel)
BottomSheet.CloseBottomSheet
End Sub


Sub Label1_Click
Drawer.LeftOpen=True
If Starter.dName.Contains("null")=False Or Starter.dVehicle.Contains("null")=False Then
drvName.Text=Starter.dName
drvVehicleNo.Text=Starter.dVehicle
Dim img As B4XBitmap = xui.LoadBitmap(File.DirAssets, "pict.jpg")
drvImage.SetBitmap(CreateRoundBitmap(img, drvImage.Width))
Else
drvName.Text=""
drvVehicleNo.Text=""
Dim img As B4XBitmap = xui.LoadBitmap(File.DirAssets, "user.png")
drvImage.SetBitmap(CreateRoundBitmap(img, drvImage.Width))
End If
End Sub

Please advice
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4XDrawer adds an underlying panel that intercepts all the touch gestures before they reach the original target. I'm not familiar with CustomButtonSheet implementation but I guess that it breaks the touch detection.

You can try to edit B4XDrawer source and modify Base_OnInterceptTouchEvent to return False if the Y coordinate is near the bottom.
 
Upvote 0
Top