Cableguy Expert Licensed User Longtime User May 1, 2015 #1 Hi guys I need to set a custom drawable and then retrieve it from the res folder... Can anyone point me an example without using other than core or reflection libs?
Hi guys I need to set a custom drawable and then retrieve it from the res folder... Can anyone point me an example without using other than core or reflection libs?
DonManfred Expert Licensed User Longtime User May 1, 2015 #2 Cableguy said: without using other than core or reflection libs? Click to expand... https://www.b4x.com/android/forum/threads/ask-about-reflector.30201/#post-175502 Upvote 0
Cableguy said: without using other than core or reflection libs? Click to expand... https://www.b4x.com/android/forum/threads/ask-about-reflector.30201/#post-175502
Cableguy Expert Licensed User Longtime User May 1, 2015 #3 Thanks Don.... I did find a small sub in another thread that works... basically the same... Code: Copy Private Sub LoadResourceDrawable(id As Int) As Object Dim r As Reflector r.Target = r.GetContext r.Target = r.RunMethod("getResources") Return r.RunMethod2("getDrawable", id, "java.lang.int") End Sub Upvote 0
Thanks Don.... I did find a small sub in another thread that works... basically the same... Code: Copy Private Sub LoadResourceDrawable(id As Int) As Object Dim r As Reflector r.Target = r.GetContext r.Target = r.RunMethod("getResources") Return r.RunMethod2("getDrawable", id, "java.lang.int") End Sub