Private eWord As B4XFloatTextField
...
SetNinePatchDrawable(eWord, "grey")
...
Sub SetNinePatchDrawable(Control As View, ImageName As String)
Dim r As Reflector
Dim package As String
Dim id As Int
package = r.GetStaticField("anywheresoftware.b4a.BA", "packageName")
id = r.GetStaticField(package & ".R$drawable", ImageName)
r.Target = r.GetContext
r.Target = r.RunMethod("getResources")
Control.Background = r.RunMethod2("getDrawable", id, "java.lang.int")
End Sub