mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 961749 - Disable tab count animation in editing mode. r=lucasr
This commit is contained in:
parent
7956f180ed
commit
371536ac3a
@ -638,7 +638,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
}
|
||||
|
||||
// Set TabCounter based on visibility
|
||||
if (isVisible() && ViewHelper.getAlpha(mTabsCounter) != 0) {
|
||||
if (isVisible() && ViewHelper.getAlpha(mTabsCounter) != 0 && !isEditing()) {
|
||||
mTabsCounter.setCountWithAnimation(count);
|
||||
} else {
|
||||
mTabsCounter.setCount(count);
|
||||
@ -863,6 +863,10 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
// in setButtonEnabled().
|
||||
final float alpha = (enabled ? 1.0f : 0.24f);
|
||||
|
||||
if (!enabled) {
|
||||
mTabsCounter.onEnterEditingMode();
|
||||
}
|
||||
|
||||
mTabs.setEnabled(enabled);
|
||||
ViewHelper.setAlpha(mTabsCounter, alpha);
|
||||
mMenu.setEnabled(enabled);
|
||||
|
@ -102,6 +102,16 @@ public class TabCounter extends GeckoTextSwitcher
|
||||
mCount = count;
|
||||
}
|
||||
|
||||
// Alpha animations in editing mode cause action bar corruption on the
|
||||
// Nexus 7 (bug 961749). As a workaround, skip these animations in editing
|
||||
// mode.
|
||||
void onEnterEditingMode() {
|
||||
final int childCount = getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
getChildAt(i).clearAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
private AnimationSet createAnimation(float startAngle, float endAngle,
|
||||
FadeMode fadeMode,
|
||||
float zEnd, boolean reverse) {
|
||||
|
Loading…
Reference in New Issue
Block a user