Hi all,
I have copied my image (normal.9.png) to the <project folder>\Objects\res\drawable folder but still get this message:
java.lang.NoSuchFieldException: normal.9.png
Can anyone please tell me what I am doing wrong?
I use this line in Activity_Create(FirstTime As Boolean)
SetNinePatchButton(btn_Ok ,"normal.9.png", "pressed.9.png")
to call the Sub below
Sub SetNinePatchButton(btn As Button, DefaultImage As String, PressedImage As String)
Dim r As Reflector
Dim package As String
Dim idDefault, idPressed As Int
package = r.GetStaticField("anywheresoftware.b4a.BA", "packageName")
idDefault = r.GetStaticField(package & ".R$drawable", DefaultImage) <<------- FAILS ON THIS LINE
with this error:
java.lang.NoSuchFieldException: normal.9.png
Any assistance would be very gratefully received.
PeterD
I have copied my image (normal.9.png) to the <project folder>\Objects\res\drawable folder but still get this message:
java.lang.NoSuchFieldException: normal.9.png
Can anyone please tell me what I am doing wrong?
I use this line in Activity_Create(FirstTime As Boolean)
SetNinePatchButton(btn_Ok ,"normal.9.png", "pressed.9.png")
to call the Sub below
Sub SetNinePatchButton(btn As Button, DefaultImage As String, PressedImage As String)
Dim r As Reflector
Dim package As String
Dim idDefault, idPressed As Int
package = r.GetStaticField("anywheresoftware.b4a.BA", "packageName")
idDefault = r.GetStaticField(package & ".R$drawable", DefaultImage) <<------- FAILS ON THIS LINE
with this error:
java.lang.NoSuchFieldException: normal.9.png
Any assistance would be very gratefully received.
PeterD