Android Question TouchImageView cannot reach activity from sub globals

HARRY

Active Member
Licensed User
Longtime User
In Main I want to use TouchImageView . In a service I want to set the bitmap as follows:

B4X:
Main.TouchImageView1.SetBitmap(bmp)
                    Main.SourceImageRect.Initialize(0, 0, bmp.Width,bmp.Height)
                    Main.TouchImageViewRect.Initialize(0, 0, Main.TouchImageView1.Width, Main.TouchImageView1.Height)
                    Main.TouchImageView1.ScaleSrcRectToDestRect(Main.SourceImageRect, Main.TouchImageViewRect, "CENTER")

When I declare Public TouchImageView1 as TouchImageView in Proces Globals then I get a message (translated) "cannot reach activity from sub ProcesGlobals,

when I declare it in Globals then in the service I get the message unknown member.
What am I doing wrong?

Harry
 

MarkusR

Well-Known Member
Licensed User
Longtime User
from the service u can call a sub in main activity.
 
Upvote 0
Top