B4A Library [B4X] [XUI] AS BottomActionSheet

This view makes it quick and easy to let the user make an action.

You need:
I spend a lot of time in creating views, like this and to create a high quality view cost a lot of time. If you want to support me and further views, then you can do it here by Paypal or with a coffee. :)

(59) mage.png
(60) mage.png


Simple Example:
    BottomActionSheet.Initialize(Me,"BottomActionSheet",Root)
 
    BottomActionSheet.AddItem("Item #1",BottomActionSheet.FontToBitmap(Chr(0xE190),True,30,xui.Color_Black),0)
    BottomActionSheet.AddItem("Item #2",BottomActionSheet.FontToBitmap(Chr(0xE190),True,30,xui.Color_Black),1)
    BottomActionSheet.AddItem("Item #3",BottomActionSheet.FontToBitmap(Chr(0xE190),True,30,xui.Color_Black),2)
 
    BottomActionSheet.ShowPicker
 
    Wait For BottomActionSheet_ItemClicked(Item As AS_BottomActionSheet_Item)
 
    BottomActionSheet.HidePicker
    Log(Item.Text & " clicked")
Dark Example:
    BottomActionSheet.Initialize(Me,"BottomActionSheet",Root)
 
    BottomActionSheet.Color = xui.Color_ARGB(255,32, 33, 37)
    BottomActionSheet.TextColor = xui.Color_White
    BottomActionSheet.DragIndicatorColor = xui.Color_White
 
    BottomActionSheet.AddItem("Item #1",Null,0)
    BottomActionSheet.AddItem("Item #2",Null,1)
    BottomActionSheet.AddItem("Item #3",Null,2)
 
    BottomActionSheet.ShowPicker
 
    Wait For BottomActionSheet_ItemClicked(Item As AS_BottomActionSheet_Item)
 
    BottomActionSheet.HidePicker
    Log(Item.Text & " clicked")
Light Example:
    BottomActionSheet.Initialize(Me,"BottomActionSheet",Root)
 
    BottomActionSheet.Color = xui.Color_White
    BottomActionSheet.TextColor = xui.Color_Black
    BottomActionSheet.DragIndicatorColor = xui.Color_Black
 
    BottomActionSheet.AddItem("Item #1",BottomActionSheet.FontToBitmap(Chr(0xE190),True,30,xui.Color_Black),0)
    BottomActionSheet.AddItem("Item #2",BottomActionSheet.FontToBitmap(Chr(0xE190),True,30,xui.Color_Black),1)
    BottomActionSheet.AddItem("Item #3",BottomActionSheet.FontToBitmap(Chr(0xE190),True,30,xui.Color_Black),2)
 
    BottomActionSheet.ShowPicker
 
    Wait For BottomActionSheet_ItemClicked(Item As AS_BottomActionSheet_Item)
 
    BottomActionSheet.HidePicker
    Log(Item.Text & " clicked")

AS_BottomActionSheet
Author: Alexander Stolte
Version: 1.00

  • AS_BottomActionSheet
    • Events:
      • ActionButtonClicked
      • ItemClicked (Item As AS_BottomActionSheet_Item)
    • Fields:
      • Tag As Object
    • Functions:
      • AddItem (Text As String, Icon As B4XBitmap, Value As Object) As String
      • Class_Globals As String
      • FontToBitmap (text As String, IsMaterialIcons As Boolean, FontSize As Float, color As Int) As B4XBitmap
      • getActionButton As B4XView
      • getActionButtonVisible As Boolean
      • getItemProperties As AS_BottomActionSheet_ItemProperties
      • HidePicker As String
      • Initialize (Callback As Object, EventName As String, Parent As B4XView) As String
        Initializes the object. You can add parameters to this method if needed.
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • setActionButtonVisible (Visible As Boolean) As String
      • setColor (Color As Int) As String
      • setTextColor (Color As Int) As String
      • ShowPicker
    • Properties:
      • ActionButton As B4XView [read only]
      • ActionButtonVisible As Boolean
      • Color
      • ItemProperties As AS_BottomActionSheet_ItemProperties [read only]
      • TextColor
  • AS_BottomActionSheet_Item
    • Fields:
      • Icon As B4XBitmap
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • Text As String
      • Value As Object
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • AS_BottomActionSheet_ItemProperties
    • Fields:
      • Height As Float
      • IconWidthHeight As Float
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • LeftGap As Float
      • SeperatorVisible As Boolean
      • TextColor As Int
      • xFont As B4XFont
    • Functions:
      • Initialize
        Initializes the fields to their default value.
Changelog
  • 1.00
    • Release
  • 1.01
    • Improvements
    • Add get and set DragIndicatorColor
Have Fun :)
 

Attachments

  • AS BottomActionSheet Example.zip
    178.2 KB · Views: 40
  • AS_BottomActionSheet.b4xlib
    3.1 KB · Views: 43
Last edited:
Top