triniwiz / nativescript-pager

Apache License 2.0
90 stars 48 forks source link

Android back navigation issue #168

Open felixkrautschuk opened 4 years ago

felixkrautschuk commented 4 years ago

If the demo apps cannot help and there is no issue for your problem, tell us about it

Please, ensure your title is less than 63 characters long and starts with a capital letter.

When navigating forwards from the page that contains the pager component and then navigates back to this page, then the binding between pager and datasource seems to be broken.

When moving forwards (or backwards), the contents are not applied to the child views, only if I move forwards/backwards for items. Difficult to explain, just look at the GIF:

pager_android_backnavigation_incorrect (see that is does not apply the text to the HtmlView for the next 3 pages and then suddenly it works, as the offScreenLimit for the Android pager is 3 by default)

Note that this effect does not happen if the user selected the first page of the pager component before navigating forwards to another page.

pager_android_backnavigation_correct

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

Describe the steps to reproduce it. Just do the same steps as provided in the GIF

Is there any code involved?

NSPagerBackNavAndroid.zip

felixkrautschuk commented 4 years ago

Calling pager.refresh() within onPagerLoaded-Event seems to fix this issue for Android. Still not sure why this is actually necessary