Android Question Error in SetPadding

Touch

Active Member
Licensed User
I used without problems for a long time the following routine:
B4X:
Sub SetPadding(v As View, Left As Int, Top As Int, Right As Int, Bottom As Int)

    Dim jo As JavaObject = v
    jo.RunMethod("setPadding", Array As Object(Left, Top, Right, Bottom))
End Sub
Now I have this error:
B4A version 4.30
Parsing code. 0.20
Compiling code. Error
Error compiling program.
Error description: Missing parameter.
Occurred on line: 33
jo.RunMethod("setPadding", Array As Object(Left, Top, Right, Bottom))
Word: )
who can help me?

Thanks
 

klaus

Expert
Licensed User
I tested it on a Label without a problem.
B4A version 4.30
Android version 4.4.4.
Could you post a small project showing the problem.
What kind of View do you try to set the padding ?
 

Touch

Active Member
Licensed User
I'm sorry.
I solved.
I included some routines with the same parameter names

B4X:
Sub Left(Text As String, Length As Long)As String

   If Length>Text.Length Then Length=Text.Length
   Return Text.SubString2(0, Length)
End Sub
...
thanks for the reply
 
Top