Bug P3
Status Update
Comments
lb...@gmail.com <lb...@gmail.com> #2
I face with the same problem. I have different pageMargin in landscape and portrait and when viewpager is scrolled for the more than first position, after rotating device it is shifted.
I beleive the problem is inside onSizeChanged that is called after onConfigurationChanged, it has following code:
if (w != oldw) {
recomputeScrollPosition(w, oldw, mPageMargin, mPageMargin);
}
w always not equals oldw when changing orientation, so recomputeScrollPosition is called, but whit the same values for margin and oldMargin.
This should be fixed.
I beleive the problem is inside onSizeChanged that is called after onConfigurationChanged, it has following code:
if (w != oldw) {
recomputeScrollPosition(w, oldw, mPageMargin, mPageMargin);
}
w always not equals oldw when changing orientation, so recomputeScrollPosition is called, but whit the same values for margin and oldMargin.
This should be fixed.
Description
This is still true, 8 years after I've reported about it:
The bugs are:
1. There is no save-state for SearchView/MenuItem.
2. Even if you try to manually save and restore the query, there is no way to put the text-caret where it was before configuration change. There is no "setSelection" for SearchView, and there is no way to reach the EditText of it either. You could remove the focus if you wish, though.
So, please offer some way to restore the state of SearchView, by normal functions we have for other View classes, and also manually if we insist on doing so.