ASK about Reflector

Theera

Well-Known Member
Licensed User
Hi all,
I've some questions which linked this.
Please to answer this thread.
 
Last edited:

Theera

Well-Known Member
Licensed User
Right? I'm sorry, I'm not good at English.

Private Sub GetResources As Object
Dim r As Reflector
r.Target= r.GetContext
Return r.RunMethod("getResources")
End Sub
Private Sub GetDrawable(id As Int) As Object
Dim r As Reflector
Return r.RunMethod2("getDrawable", id, "java.lang.int")
End Sub
 
Last edited:
Upvote 0

Erel

Administrator
Staff member
Licensed User
B4X:
Private Sub GetResources As Object
Dim r As Reflector
r.Target= r.GetContext
Return r.RunMethod("getResources")
End Sub

Private Sub GetDrawable(id As Int) As Object
Dim r As Reflector
r.Target = GetResources '<--- without it the reflector object will be null
Return r.RunMethod2("getDrawable", id, "java.lang.int")
End Sub
 
Upvote 0
Top