B4J Library [B4A] [XUI] SD: XUI_DragView

Discussion in 'B4J Libraries & Classes' started by Star-Dust, Apr 30, 2018.

  1. Star-Dust

    Star-Dust Expert Licensed User

    This library handles drag and drop of XUI views.
    It is a simple library with few methods but it only serves to drag the space already indicated.

    Good fun


    Author: Star-Dust
    Version: 0.01
    • DragDropView
      • Events:
        • PlacedCoordinate (DragView As B4XView)
        • PlacedView (DragView As B4XView, PlaceView As B4XView)
      • Fields:
        • OverPlaceMoreView As Boolean
      • Functions:
        • AddDragView (View As B4XView, AddAlsoPlaceCoordinate As Boolean) As DragDropView
          View is mobible View (Label,Panel ecc..)
          AddAlsoPlaceCoordinate (boolean) Add Initial View Coordinate to AddPlaceCoordinate
        • AddPlaceCoordinate (Left As Int, Top As Int, Width As Int, Height As Int) As DragDropView
        • AddPlaceView (View As B4XView) As DragDropView
        • Class_Globals As String
        • ClearDrag As String
        • ClearPlaceCoordinate As String
        • ClearPlaceView As String
        • Initialize (mCallBack As Object, mEventName As String) As String
          Initializes the object. You can add parameters to this method if needed.
        • IsInitialized As Boolean
          Verifica se l'oggetto sia stato inizializzato.

    Attached Files:

    Last edited: Apr 30, 2018
  2. Star-Dust

    Star-Dust Expert Licensed User

    Sub Globals
    Dim DD As DragDropView
    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
    End Sub

    Sub Activity_Create(FirstTime As Boolean)

    End Sub

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

    Star-Dust Expert Licensed User

    ------------ B4A ------------------------------- B4J ---------------
    video3.gif screenshot1.png
    Mashiane likes this.
  4. Star-Dust

    Star-Dust Expert Licensed User