Star-Dust Expert Licensed User Longtime User Feb 9, 2018 #1 I tried to transform a code that uses the JavaObject Library into Reflector. So do not use too many Libraries in my code .. but without result ... Code: Copy Dim jo As JavaObject = SearchButton.Background jo.RunMethod("setColorFilter", Array As Object(ColorSearchButton, "SRC_OUT")) This don't work Code: Copy Dim Re As Reflector Re.Target=SearchButton.Background Re.RunPublicmethod("setColorFilter",Array As Object(ColorSearchButton, "SRC_OUT"),Array As String("java.lang.int", "java.lang.String"))
I tried to transform a code that uses the JavaObject Library into Reflector. So do not use too many Libraries in my code .. but without result ... Code: Copy Dim jo As JavaObject = SearchButton.Background jo.RunMethod("setColorFilter", Array As Object(ColorSearchButton, "SRC_OUT")) This don't work Code: Copy Dim Re As Reflector Re.Target=SearchButton.Background Re.RunPublicmethod("setColorFilter",Array As Object(ColorSearchButton, "SRC_OUT"),Array As String("java.lang.int", "java.lang.String"))
Erel B4X founder Staff member Licensed User Longtime User Feb 11, 2018 #3 JavaObject is preferred over Reflection. There are cases where you must use Reflection. In that cases you should use both libraries. JavaObject will add about 2kb to your app. You will never notice it. Upvote 0
JavaObject is preferred over Reflection. There are cases where you must use Reflection. In that cases you should use both libraries. JavaObject will add about 2kb to your app. You will never notice it.