I tried to use other methods in the code snippet "Custom Toast Message".
1:
2:
Also, is there a way to increase the size of the toast?
[I used this and it is useful enough:
cs.Initialize.Color(Colors.Blue).Size(50).Append("Custom" & CRLF & CRLF & "Toast").PopAll
(I know, I should use smart strings in my code )
]
1:
B4X:
' Seems to not work.
Dim horizontalMargin, verticalMargin As Float
horizontalMargin = 50 '%
verticalMargin = 25 ' %
toast.RunMethod("setMargin", Array (horizontalMargin, verticalMargin))
2:
B4X:
Dim pnl As Panel
...
toast.RunMethod("setView", pnl)
' incompatible types: ViewGroup cannot be converted to Object[]
' Error even if I use a simple Label.
Also, is there a way to increase the size of the toast?
[I used this and it is useful enough:
cs.Initialize.Color(Colors.Blue).Size(50).Append("Custom" & CRLF & CRLF & "Toast").PopAll
(I know, I should use smart strings in my code )
]