Assigned
Status Update
Comments
la...@gmail.com <la...@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
Component used: Version used: Devices/Android versions reproduced on:
If this is a bug in the library, we would appreciate if you could attach:
If this is a bug in the library, we would appreciate if you could attach:
Lint warning is triggered when
showAsAction
always
is being used, it should not since there is only one item here that has that value if we follow the lint warning message:Inspection info:Using showAsAction="always" in menu XML, or MenuItem.SHOW_AS_ACTION_ALWAYS in Java code is usually a deviation from the user interface style guide.Use ifRoom or the corresponding MenuItem.SHOW_AS_ACTION_IF_ROOM instead. If always is used sparingly there are usually no problems and behavior is roughly equivalent to ifRoom but with preference over other ifRoom items. Using it more than twice in the same menu is a bad idea. This check looks for menu XML files that contain more than two always actions, or some always actions and no ifRoom actions. In Java code, it looks for projects that contain references to MenuItem.SHOW_AS_ACTION_ALWAYS and no references to MenuItem.SHOW_AS_ACTION_IF_ROOM. Issue id: AlwaysShowAction
If we follow the lint and use
ifRoom
together withcollapseActionView
, theSearchView
when expanded will now be also showing along with collapsed menu items. When you click that item it will do nothing and will disappear if you open the collapse menu items again. Now if you collapsed theSearchView
via back press its icon will also disappear in theToolbar
. This is clearly an unexplored bug.The only work around here is to use
always
soSearchView
will not show among collapsed menu items and its icon will not also suddenly in which the lint is disapproving.