IconButton
Version: 1.11
Version: 1.11
- IconButton
Events:- Click()
- Down()
- HoverEnter()
- HoverExit()
- LongClick()
- Up()
- AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
programmatically add the view (the Button) - DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
- Initialize (EventName As String)
- setIcon (LeftSide As Boolean, d As Drawable)
- setPadding (left As Int, top As Int, right As Int, bottom As Int)
Sets the Padding for this Button
- Background As Drawable [write only]
Sets the Buttons background - BackgroundColor As Int [write only]
Sets the Buttons background color - BackgroundDrawable As Drawable [write only]
Sets the Buttons background drawable (deprecated) - Enabled As Boolean [write only]
Sets the Buttons enabled state - Height As Int
- IconPadding As Int [write only]
Set the Padding between Text and Icon - Left As Int
- Text As String [write only]
Set the Text - TextAlignment As Void
Sets the Alignment for this Button - TextColor As Int [write only]
Sets the Textcolor for this Button - Top As Int
- Typeface As Typeface
Sets the Typeface for this Button - Width As Int
B4X:
Dim bm As BitmapDrawable
bm.Initialize(LoadBitmap(File.DirAssets,"ic_action_alarm.png"))
ib1.Text = "Button"
ib1.IconPadding = 50
ib1.setIcon(True,bm)
Dim bm As BitmapDrawable
bm.Initialize(LoadBitmap(File.DirAssets,"ic_action_achievement.png"))
ib2.Text = "Button"
ib2.IconPadding = 50
ib2.setIcon(False,bm)
Dim bm As BitmapDrawable
bm.Initialize(LoadBitmap(File.DirAssets,"ic_action_android.png"))
ib3.Text = "Button"
ib3.IconPadding = 50
ib3.setIcon(False,bm)
Attachments
Last edited: