B4A Library B4APhotoPager v3.85

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi guys, B4APhotoPager is updated v.150 what' new.

Changed:

ToggleDoubleTap instead of DoubleTapEnabled

ToggleFade instead of FadeEnabled

ToggleLock instead of PagingEnabled

ToggleZoom instead of ScaleEnabled and ScrollEnabled

fixed ScaleType now work great.

minor bug fixed.
 

nso91191

Member
Licensed User
Longtime User
I got this error, please help me

B4X:
** Activity (main) Create, isFirst = true **


java.lang.StackOverflowError


    at java.lang.Throwable.<init>(Throwable.java:67)
    at java.lang.Throwable.<init>(Throwable.java:95)
    at java.lang.Exception.<init>(Exception.java:47)
    at java.io.IOException.<init>(IOException.java:44)
    at java.io.FileNotFoundException.<init>(FileNotFoundException.java:42)
    at android.content.res.AssetManager.openAsset(Native Method)
    at android.content.res.AssetManager.open(AssetManager.java:315)
    at android.content.res.AssetManager.open(AssetManager.java:289)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:910)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityMain.getBitmapFromAssets(PagerActivityMain.java:912)
    at it.giuseppe.salvi.library.core.photopager.main.PagerActivityM


Message longer than Log limit (4000). Message was truncated.
 

lonleystar

Well-Known Member
Licensed User
Longtime User

Hi, did U copy the icon from the demo in your assets folder?

or put some icon in your assets folder and call them by:


SetImageForEmptyUri and SetImageOnFail
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
I am getting the same error above and yes, the icon is there.
How do I call 'SetImageOnFail' ?
 

lonleystar

Well-Known Member
Licensed User
Longtime User
I am getting the same error above and yes, the icon is there.
How do I call 'SetImageOnFail' ?

Hi, store some Icon in your assets folder = your Project and in your project there is a File( Files = assets folder)
and in Activity_Create call example:


vp.SetImageForEmptyUri = "icon.png"
vp.SetImageOnFail = "icon.png"
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
Hi, store some Icon in your assets folder = your Project and in your project there is a File( Files = assets folder)
and in Activity_Create call example:


vp.SetImageForEmptyUri = "icon.png"
vp.SetImageOnFail = "icon.png"


Thanks. I just had to do it before I called init.
 

sgt

Member
Licensed User
Longtime User
Hi Lonleystar, is there any way to increase the image quality of the displayed images even if it slows down the paging between items. I am displaying photos with text that has been overlay onto the original photo and you can tell the image quality is quite low as the text is blurred. Thanks ...
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi, the image quality depend of your images it display the images in original size.

P.S.

Try with scaletype
 

MarcoRome

Expert
Licensed User
Longtime User
Hi Giuseppe. Thank's fot this great library. One question....
I have example 1.30 and library 1.50
whe i compile i have this error :

B4X:
Parsing code.                           0.00
Compiling code.                         Error
Error compiling program.
Error description: Riferimento a un oggetto non impostato su un'istanza di oggetto.
Occurred on line: 36
vp.ToggleFade = True
Word: =

if i comment this line all work. Any idea ??
Thank you
 

Ionut Indigo

Member
Licensed User
Longtime User
Hey @MarcoRome,
Just simply write vp.ToggleFade (with no = true/false) if you want the fade transition effect to be enable. If you don't write that code it will be by default disabled.
 

bluedude

Well-Known Member
Licensed User
Longtime User
I like it a lot but my feeling says the diskcache does not work. When I go offline I cannot load images which indicates the cache does not work. Where do you exactly store cache images?

Would be nice to set a cache directory or db.

Cheers.
 

bluedude

Well-Known Member
Licensed User
Longtime User
Seems the cache is indeed working. Can I switch off error messages or intercept them?
 

bluedude

Well-Known Member
Licensed User
Longtime User
The cache stuff works but how can I supress error messages like output error, cannot decode image etc.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…