Open felixkrautschuk opened 4 years ago
temporary workaround:
app.on(app.orientationChangedEvent, function(args) {
setTimeout(function() {
if(pager.selectedIndex > 0) {
let temp = pager.selectedIndex;
pager.scrollToIndexAnimated(temp-1, true);
pager.scrollToIndexAnimated(temp, true);
}
}, 300);
});
but I hope there will be an official fix for this issue, because the workaround still has some optical side effects
Try forcing a layout e.g requestLayout
@triniwiz I already tried
pager.requestLayout();
and
pager.eachChild(function (view) {
view.requestLayout();
});
but unfortunately that does not help
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.
When changing the orientation from portrait to landscape and then back to portrait, the user sees 95% of the next page.... just have a look at the GIF:
This issue does not occur if the user has selected the first page in the pager. But as soon as he goes forward to the second page, then you can see this side effect.
Is there any code involved?
NSPagerIssueOrientationAndroid.zip
It is also reproducable on the demo app of this repo.