Thank you Don but I was thinking of doing something as follows:
B4X:
Dim Obj1 As Reflector
Obj1.Target = myButton
Obj1.RunMethod("animate")
Obj1.RunMethod2("rotationBy",360.0f, "java.lang.float")
Obj1.RunMethod2("setDuration",5000, "java.lang.int")
Obj1.RunMethod("start")
but this will not work.
I can probably use inline-java or one of the plenty animations libraries available but I wanted to get it working either with Reflector or JavaObject (or a combination of both if necessary).
I guess you need to get an reference to the animator. initializestatic or so?
with the animator then you can use the methods you posted in post#1 i guess.
Sub Rotate(view As View, Degree As Float, Duration As Long)
Dim jo As JavaObject = view
jo.RunMethodJO("animate", Null).RunMethodJO("rotationBy", Array(Degree)).RunMethodJO("setDuration", Array(Duration)).RunMethodJO("start", Null)
End Sub
Sub Rotate(view As View, Degree As Float, Duration As Int)
Dim jo As JavaObject = view
jo.RunMethodJO("animate", Null).RunMethodJO("rotationBy", Array(Degree)).RunMethodJO("setDuration", Array(Duration)).RunMethodJO("start", Null)
End Sub