зеркало из https://github.com/mozilla/gecko-dev.git
Bug 976176 - Clear animations before trying to hide home banner on pre-honeycomb devices. r=lucsar
This commit is contained in:
Родитель
f60a15d413
Коммит
2bf4b786e3
|
@ -19,6 +19,7 @@ import org.mozilla.gecko.util.ThreadUtils;
|
|||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
|
@ -107,6 +108,17 @@ public class HomeBanner extends LinearLayout
|
|||
GeckoAppShell.getEventDispatcher().unregisterEventListener("HomeBanner:Data", this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVisibility(int visibility) {
|
||||
// On pre-Honeycomb devices, setting the visibility to GONE won't actually
|
||||
// hide the view unless we clear animations first.
|
||||
if (Build.VERSION.SDK_INT < 11 && visibility == View.GONE) {
|
||||
clearAnimation();
|
||||
}
|
||||
|
||||
super.setVisibility(visibility);
|
||||
}
|
||||
|
||||
public void setScrollingPages(boolean scrollingPages) {
|
||||
mScrollingPages = scrollingPages;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче