B4A Library [B4X] [XUI] SD ProductPicker

SD_ProductPicker

Author:
Star-Dust
Version: 1.07
  • DiskImagePicker
    • Events:
      • BallClicked (Index As Int)
      • BallLongClicked (Index As Int)
      • ChangeIndex (Index As Int)
      • CloveClicked (Index As Int)
    • Functions:
      • Class_Globals As String
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
        Base type must be Object
      • getInfoTopPosition As Float
        value: 0.00 to 1.00
      • getBallFontSize As Int
      • getCentralBallDept As Int
        default = 50dip
      • getInfoFontSize As Int
      • getPickerIndex As Int
      • getSize As Int
      • getTextFontSize As Int
      • getTextTopPosition As Float
        value: 0.00 to 1.00
      • Initialize (Callback As Object, EventName As String) As String
      • setInfoTopPosition (S As Float) As String
      • setBallFontSize (S As Int) As String
      • setCentralBallDept (S As Int) As String
      • setInfoFontSize (S As Int) As String
      • setPickerIndex (T As Int) As String
      • setTextFontSize (S As Int) As String
      • setTextTopPosition (S As Float) As String
      • DeleteItem (Pos As Int) As String
        DI.DeleteItem(0)
      • AddItem (Text As String, Info As String, Img As B4XBitmap) As DiskImagePicker
      • ClearList As String
      • GetItemInfo (Pos As Int) As String
        es. Picker.GetItemInfo(0) - Pos: 0 to n-1
      • GetItemText (Pos As Int) As String
        es. Picker.GetItemText(0) - Pos: 0 to n-1
      • Invalidate As String
      • IsInitialized As Boolean
        Verifica se l'oggetto sia stato inizializzato.
    • Properties:
      • InfoTopPosition As Float
        value: 0.00 to 1.00
      • BallFontSize As Int
      • CentralBallDept As Int
        default = 50dip
      • InfoFontSize As Int
      • PickerIndex As Int
      • Size As Int [read only]
      • TextFontSize As Int
      • TextTopPosition As Float
        value: 0.00 to 1.00
  • HorizontalPicker
    • Events:
      • ChangeIndex (Index As Int)
      • Clicked (Index As Int)
      • LongClicked (Index As Int)
    • Fields:
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • Class_Globals As String
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
        Base type must be Object
      • getInfoTopPosition As Float
        value: 0.00 to 1.00
      • getInfoFontSize As Int
      • getPickerIndex As Int
      • getSize As Int
      • getTextFontSize As Int
      • getTextTopPosition As Float
        value: 0.00 to 1.00
      • Initialize (Callback As Object, EventName As String) As String
      • setInfoTopPosition (S As Float) As String
      • setInfoFontSize (S As Int) As String
      • setPickerIndex (T As Int) As String
      • setTextFontSize (S As Int) As String
      • setTextTopPosition (S As Float) As String
      • DeleteItem (Pos As Int) As String
        DI.DeleteItem(0)
      • AddItem (Text As String, Info As String, Img As B4XBitmap) As HorizontalPicker
      • ClearList As String
      • GetItemInfo (Pos As Int) As String
        es. Picker.GetItemInfo(0) - Pos: 0 to n-1
      • GetItemText (Pos As Int) As String
        es. Picker.GetItemText(0) - Pos: 0 to n-1
      • Invalidate As String
      • IsInitialized As Boolean
        Verifica se l'oggetto sia stato inizializzato.
    • Properties:
      • InfoTopPosition As Float
        value: 0.00 to 1.00
      • InfoFontSize As Int
      • PickerIndex As Int
      • Size As Int [read only]
      • TextFontSize As Int
      • TextTopPosition As Float
        value: 0.00 to 1.00
  • HorizontalTextPicker
    • Events:
      • ChangeIndex (Index As Int)
      • Clicked (Index As Int)
      • LongClicked (Index As Int)
    • Fields:
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • Class_Globals As String
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
        Base type must be Object
      • getInfoTopPosition As Float
        value: 0.00 to 1.00
      • getInfoFontSize As Int
      • getPickerIndex As Int
      • getSize As Int
      • getTextFontSize As Int
      • Initialize (Callback As Object, EventName As String) As String
      • setInfoTopPosition (S As Float) As String
      • setInfoFontSize (S As Int) As String
      • setPickerIndex (T As Int) As String
      • setTextFontSize (S As Int) As String
      • DeleteItem (Pos As Int) As String
        DI.DeleteItem(0)
      • AddItem (Text As String, Info As String) As HorizontalTextPicker
      • ClearList As String
      • GetItemInfo (Pos As Int) As String
        es. Picker.GetItemInfo(0) - Pos: 0 to n-1
      • GetItemText (Pos As Int) As String
        es. Picker.GetItemText(0) - Pos: 0 to n-1
      • Invalidate As String
      • IsInitialized As Boolean
        Verifica se l'oggetto sia stato inizializzato.
    • Properties:
      • InfoTopPosition As Float
        value: 0.00 to 1.00
      • InfoFontSize As Int
      • PickerIndex As Int
      • Size As Int [read only]
      • TextFontSize As Int



  • 1.01
    • Fix bugs
    • Added CloveClicked method to DiskImagePicker
    • Added HorizontalPicker class
  • 1.02
    • Added in the design the possibility to color the frame of the element at the moment of the click
  • 1.03
    • Added LongClicked event to HorizontalPicker
  • 1.04
    • Added BallLongClicked event to DiskImagePicker
  • 1.05
    • Added HorizontalTextPicker (Only text)
    • Fix bugs HorizontalPicker
  • 1.06
    • Added DeleteItem and Size
  • 1.07
    • Added GetItemText and GetItemInfo. It allows you to know the content of the text and information in a specific position



ezgif.com-optimize.gif


ezgif.com-optimize.gif
 

Attachments

  • SD_ProductPicker 1.07.zip
    24.8 KB · Views: 175
  • jSD_ProductPicker 1.07.zip
    24.8 KB · Views: 178
  • iSD_ProductPicker 1.07.zip
    222.1 KB · Views: 181
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Cross-platform example

Use:
Root.LoadLayout("MainPage")
    ' Default valute - not necessary
    DiskImagePicker1.CentralBallDept=50dip
    DiskImagePicker1.BallFontSize=30
    DiskImagePicker1.TextFontSize=30
    DiskImagePicker1.InfoFontSize=16
    DiskImagePicker1.TextTopPosition=0.30
    DiskImagePicker1.InfoTopPosition=0.40
    ' insert item
    DiskImagePicker1.AddItem("C1","Model 1",xui.LoadBitmap(File.DirAssets,"c1.png"))
    DiskImagePicker1.AddItem("C2","Model 2",xui.LoadBitmap(File.DirAssets,"c2.png"))
    DiskImagePicker1.AddItem("C3","Model 3",xui.LoadBitmap(File.DirAssets,"c3.png"))
    DiskImagePicker1.AddItem("C4","Model 4",xui.LoadBitmap(File.DirAssets,"c1.png"))
    DiskImagePicker1.AddItem("C5","Model 5",xui.LoadBitmap(File.DirAssets,"c2.png"))
    DiskImagePicker1.AddItem("C6","Model 6",xui.LoadBitmap(File.DirAssets,"c3.png"))

Video2.gif


HorizontalTextPicker
B4X:
For i=1 To 10
   HorizontalTextPicker1.AddItem("Element " & I ,"Info " & I)
Next
ezgif.com-optimize.gif
 

Attachments

  • ProductPickerSample.zip
    291.7 KB · Views: 240
  • ProductPickerSample2.zip
    291.3 KB · Views: 161
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Update rel .1.06
  • Added DeleteItem and Size
I added the ability to delete an item and see how many items are in the list,

Example: Delete the last item
B4X:
HorizontalPicker1.DeleteItem(HorizontalPicker1.Size-1)
 

Star-Dust

Expert
Licensed User
Longtime User
Update rel. 1.07
  • Added GetItemText and GetItemInfo. It allows you to know the content of the text and information in a specific position
 
Top