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.
AS_BottomActionSheet
Author: Alexander Stolte
Version: 1.00
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.
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
FontAwesome To Bitmap
Unlike an older "TextToBitmap" sub that you can find in the forum, this code vertically centers the icon. It can also be used in B4J and B4i (only need to change the font line). Sub Activity_Create(FirstTime As Boolean) 'usage example Activity.AddMenuItem3("Android", "Test"...www.b4x.com - 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
- Events:
- 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.
- Initialize
- Fields:
- 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.
- Initialize
- Fields:
- 1.00
- Release
- 1.01
- Improvements
- Add get and set DragIndicatorColor
Attachments
Last edited: