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
|
// Set TabCounter based on visibility
|
||||||
if (isVisible() && ViewHelper.getAlpha(mTabsCounter) != 0) {
|
if (isVisible() && ViewHelper.getAlpha(mTabsCounter) != 0 && !isEditing()) {
|
||||||
mTabsCounter.setCountWithAnimation(count);
|
mTabsCounter.setCountWithAnimation(count);
|
||||||
} else {
|
} else {
|
||||||
mTabsCounter.setCount(count);
|
mTabsCounter.setCount(count);
|
||||||
@ -863,6 +863,10 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
|||||||
// in setButtonEnabled().
|
// in setButtonEnabled().
|
||||||
final float alpha = (enabled ? 1.0f : 0.24f);
|
final float alpha = (enabled ? 1.0f : 0.24f);
|
||||||
|
|
||||||
|
if (!enabled) {
|
||||||
|
mTabsCounter.onEnterEditingMode();
|
||||||
|
}
|
||||||
|
|
||||||
mTabs.setEnabled(enabled);
|
mTabs.setEnabled(enabled);
|
||||||
ViewHelper.setAlpha(mTabsCounter, alpha);
|
ViewHelper.setAlpha(mTabsCounter, alpha);
|
||||||
mMenu.setEnabled(enabled);
|
mMenu.setEnabled(enabled);
|
||||||
|
@ -102,6 +102,16 @@ public class TabCounter extends GeckoTextSwitcher
|
|||||||
mCount = count;
|
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,
|
private AnimationSet createAnimation(float startAngle, float endAngle,
|
||||||
FadeMode fadeMode,
|
FadeMode fadeMode,
|
||||||
float zEnd, boolean reverse) {
|
float zEnd, boolean reverse) {
|
||||||
|
Loading…
Reference in New Issue
Block a user