diff options
| author | 2015-04-29 19:57:46 +0000 | |
|---|---|---|
| committer | 2015-04-29 19:57:48 +0000 | |
| commit | 05a56db39d26e1e6ee160e82b79df39c15d1804c (patch) | |
| tree | f8f145c8710445038de769ae0e6b795db641f15f | |
| parent | 5686780404a41901d226cc7ba506c1c0ba284713 (diff) | |
| parent | c23ac32601af1c7a5877d99c221e7e79e0ed1c90 (diff) | |
Merge "DO NOT MERGE: Minor fixes to FloatingToolbar." into mnc-dev
| -rw-r--r-- | core/java/com/android/internal/widget/FloatingToolbar.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/com/android/internal/widget/FloatingToolbar.java b/core/java/com/android/internal/widget/FloatingToolbar.java index 3a1e0caed2eb..3f7696fa8c34 100644 --- a/core/java/com/android/internal/widget/FloatingToolbar.java +++ b/core/java/com/android/internal/widget/FloatingToolbar.java @@ -438,6 +438,9 @@ public final class FloatingToolbar { // Make sure a panel is set as the content. if (mContentContainer.getChildCount() == 0) { setMainPanelAsContent(); + // If we're yet to show the popup, set the container visibility to zero. + // The "show" animation will make this visible. + mContentContainer.setAlpha(0); } preparePopupContent(); mPopupWindow.showAtLocation(mParent, Gravity.NO_GRAVITY, x, y); @@ -478,7 +481,7 @@ public final class FloatingToolbar { * Returns {@code true} if this popup is currently showing. {@code false} otherwise. */ public boolean isShowing() { - return mPopupWindow.isShowing() && !mDismissed && !mHidden; + return !mDismissed && !mHidden; } /** @@ -494,7 +497,7 @@ public final class FloatingToolbar { * This is a no-op if this popup is not showing. */ public void updateCoordinates(int x, int y) { - if (!isShowing()) { + if (!isShowing() || !mPopupWindow.isShowing()) { return; } |