Public Sub rv_RequestUpdate
'This will generate a bitmap file called L_Header.png in File.DirInternal
CommonCode.Generate_Image("L","Header",header,0,0,False)
'This command works: rv.SetImage("Header",LoadBitmapSample(File.DirInternal,"L_Header.png",125dip,25dip))
SetUri("widget2x2L", "Header", "file://" & File.Combine(File.DirInternal, "L_Header.png")) 'widget2x2L is my service's name
rv.UpdateWidget
End Sub
Sub SetUri(ClassName As String, ImageViewName As String, Uri As String)
Dim xlb As XmlLayoutBuilder
Dim id As Int = xlb.GetResourceId("id", ClassName.ToLowerCase & "_" & ImageViewName.ToLowerCase)
Dim r As Reflector
r.Target = rv
r.RunMethod("checkNull")
r.Target = r.GetField("current")
Dim u As Object = r.RunStaticMethod("android.net.Uri", "parse", Array(Uri), Array As String("java.lang.String"))
r.RunMethod4("setImageViewUri", Array(id, u), Array As String ("java.lang.int", "android.net.Uri"))
End Sub