Android Question how to use SMM with ImageView

mzsoft

Member
i want to use smm in my project.
now i have imageview in all activity and not to change to panel.
i use this code

B4X:
Dim im As ImageView
        im.Initialize("im")
        Activity.AddView(im,0,0,100%x,100%y)
        MediaManager.SetMediaFromFile(im,File.DirAssets,"ims.jpg","image/png", Null)

but this error show.

B4X:
smmviews$ResumableSub_AddMediaresume (java line: 121)
java.lang.RuntimeException: Type does not match (class android.widget.ImageView)
    at anywheresoftware.b4a.objects.B4XViewWrapper.typeDoesNotMatch(B4XViewWrapper.java:405)
    at anywheresoftware.b4a.objects.B4XViewWrapper.asPanelWrapper(B4XViewWrapper.java:111)
    at anywheresoftware.b4a.objects.B4XViewWrapper.AddView(B4XViewWrapper.java:341)
    at b4a.example.udp.smmviews$ResumableSub_AddMedia.resume(smmviews.java:121)

how can i use imageview instead of panel
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…