Android Question XUI_DragView-View Button gets bugged

FabianGS

Member
Hello team, i found this Library Drawable View, everything just works fine but IDK if there is a bug when i tried to Add a (AddDragView) to a Button, this button doesnt work anymore to be clicked, just like the code below

Main:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim DD As DragDropView
    Dim DL As DragLabel
   
    Private PanelBase As Panel
    Private Label1 As Label
    Private Label2 As Label
    Private Label3 As Label
    Private Label4 As Label
    Private Label5 As Label
    Private Label6 As Label
   
   
    Private Place1 As Label
    Private Place2 As Label
    Private Place3 As Label
    Private Place4 As Label
    Private Place5 As Label
    Private Place6 As Label
    Private Button1 As B4XView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("main")
    DD.Initialize(Me,"DD")
    DD.AddDragView(Label1,False).AddDragView(Label2,False).AddDragView(Label3,False).AddDragView(Label4,False).AddDragView(Label5,False).AddDragView(Label6,False)
    DD.AddPlaceView(Place1).AddPlaceView(Place2).AddPlaceView(Place3).AddPlaceView(Place4).AddPlaceView(Place5).AddPlaceView(Place6)
   
    DD.AddDragView(Button1, False).AddPlaceView(Button1)
   
   
   
End Sub

Sub Activity_Resume

End Sub

Sub View_Touch(viewtag As Object, action As Int, X As Float, Y As Float, motionevent As Object) As Boolean
    Return True
End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub DD_Placed(DragView As View, PlaceView As View)
    Log(DragView.Tag & " - " & PlaceView.Tag)
End Sub


Private Sub Button1_LongClick
    Log("HOLA AMIGOS")
End Sub

Private Sub Button1_Click
    Log("HOLA AMIGOS")
'    DD.AddDragView(Sender, True)
    DD.ClearPlaceCoordinate
    DD.ClearDrag
End Sub

Private Sub DD_DragViewMoving(DragView As B4XView)
    Log("Moved: " & DragView.Tag)
End Sub

Am i doing something wrong? Why the Button lost its properties to be Clicked, LongClick??
Thanks in advance
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…