Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: When app goes to background then to foreground, image does not display #28

Open
davecoffin opened this issue Aug 9, 2018 · 2 comments

Comments

@davecoffin
Copy link

View a photo in the gallery, then go to the homescreen. Then go back to the app. The photo you were viewing does not display. If you swipe over, the next one displays and everything works as normal. In onresume, probably something needs to happen to display the photo.

@rondey
Copy link

rondey commented Jun 17, 2019

I had a similar problem with the RadListView. The solution was call the RadListView function "refresh" inside the callback of resumeEvent

@joralegre
Copy link

View a photo in the gallery, then go to the homescreen. Then go back to the app. The photo you were viewing does not display. If you swipe over, the next one displays and everything works as normal. In onresume, probably something needs to happen to display the photo.

Detect "on resume event" and refresh();
Ex:
const applicationModule = require("tns-core-modules/application");

function pageLoaded(args) {
var page = args.object;
...
...... your code ...........
...
//Detect Refresh
resumeListener = (args) => {
console.log("The appication was resumed!");
//refresh your gallery
page.getViewById("gallery").refresh();
};
applicationModule.on(applicationModule.resumeEvent, resumeListener);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants