Subject: Set and get the 'padding' of a view.
Sub: setPadding
Description: Sets the padding'of a view.
Sub: getPaddingLeft
Description: Gets the left 'padding' of a view.
Sub: getPaddingTop
Description: Gets the top 'padding' of a view.
Sub: getPaddingRight
Description: Gets the right 'padding' of a view.
Sub: getPaddingBottom
Description: Gets the bottom 'padding' of a view.
Tags: View, Padding, getPadding, setPadding
Sub: setPadding
Description: Sets the padding'of a view.
B4X:
'Sets the padding of a view
'v = view
'Left, Top, Right, Bottom padding values in pixels
Sub setPadding(v As View, Left As Int, Top As Int, Right As Int, Bottom As Int)
Dim jo = v As JavaObject
jo.RunMethod("setPadding", Array As Object(Left, Top, Right, Bottom))
End Sub
Sub: getPaddingLeft
Description: Gets the left 'padding' of a view.
B4X:
'Gets the Left padding of the given view
Sub getPaddingLeft(v As View) As Int
Dim jo = v As JavaObject
Return jo.RunMethod("getPaddingLeft", Null)
End Sub
Sub: getPaddingTop
Description: Gets the top 'padding' of a view.
B4X:
'Gets the Top padding of the given view
Sub getPaddingTop(v As View) As Int
Dim jo = v As JavaObject
Return jo.RunMethod("getPaddingTop", Null)
End Sub
Sub: getPaddingRight
Description: Gets the right 'padding' of a view.
B4X:
'Gets the Right padding of the given view
Sub getPaddingRight(v As View) As Int
Dim jo = v As JavaObject
Return jo.RunMethod("getPaddingRight", Null)
End Sub
Sub: getPaddingBottom
Description: Gets the bottom 'padding' of a view.
B4X:
'Gets the Bottom padding of the given view
Sub getPaddingBottom(v As View) As Int
Dim jo = v As JavaObject
Return jo.RunMethod("getPaddingBottom", Null)
End Sub
Tags: View, Padding, getPadding, setPadding
Last edited: