Image Viewer

gapi

Active Member
Licensed User
Longtime User
Hi all, anyone know how can show N images (.jpg) with default android behavior ? With scroller and zoom funcs ? I need to use some intent?

tnx
 

gapi

Active Member
Licensed User
Longtime User
thanks NJDude already knew him but for open three .jpg from scard, all I need is a classic viewer ... with intent would save a lot of lines of code or not ?
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
If you just want an intent to open pictures then this is the one:
B4X:
Dim iIntent As Intent 

iIntent.Initialize(iIntent.ACTION_VIEW, "<PATH-TO-THE-PICTURE>")
iIntent.SetType("image/jpeg")

StartActivity(iIntent)

You will have to add the path to the pictures.
 
Upvote 0

gapi

Active Member
Licensed User
Longtime User
great NJDude very strong these intent ... don't understand why they do not make more extensive use of them.
What are the advantages and not ? tnx
 
Upvote 0

gapi

Active Member
Licensed User
Longtime User

Can I limit viewer to 3 images (a.jpg;b.jpg;c.jpg) in folder ? Without view all files ? tnx
 
Upvote 0

gapi

Active Member
Licensed User
Longtime User
mmm... with List don't work here code:

B4X:
Dim images As List
   
   
   images.Initialize
   images.Add(Main.RootImage & img1)
   images.Add(Main.RootImage & img2)
   images.Add(Main.RootImage & img3)

iIntent.Initialize(iIntent.ACTION_VIEW, images)
iIntent.SetType("image/jpeg")

StartActivity(iIntent)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…