summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yohei Yukawa <yukawa@google.com> 2015-07-16 04:39:44 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-07-16 04:39:44 +0000
commitfd166329be9fa223bb28ebfef53c73fe4bb50143 (patch)
tree0be6582070b844dade404b25086785b9aee22b87
parentdbcba09295a01922de675fcff63b5419427f45d8 (diff)
parent5301bd7274a48528f8a1cf4ed3fa402a65e64a56 (diff)
am 5301bd72: am c37b7922: am 66b8377e: am 2e030285: am ebbe7706: Merge "Fix comment bug in I71a8d356e868dc7715b030ca1078da4ec39368c3." into mnc-dev
* commit '5301bd7274a48528f8a1cf4ed3fa402a65e64a56': Fix comment bug in I71a8d356e868dc7715b030ca1078da4ec39368c3.
-rw-r--r--core/java/com/android/internal/widget/FloatingToolbar.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/com/android/internal/widget/FloatingToolbar.java b/core/java/com/android/internal/widget/FloatingToolbar.java
index b3f688bbbd04..3482d3ce2ba3 100644
--- a/core/java/com/android/internal/widget/FloatingToolbar.java
+++ b/core/java/com/android/internal/widget/FloatingToolbar.java
@@ -450,7 +450,10 @@ public final class FloatingToolbar {
}
refreshCoordinatesAndOverflowDirection(contentRectOnScreen);
preparePopupContent();
- // We need to specify the offset relative to mParent.
+ // PopupWindow#showAtLocation() receives the location relative to the attached window
+ // hence the following code is correct when and only when mParent is aligned to the
+ // top-left of the attached window.
+ // TODO: Fix the following logic so that mParent can be placed at anywhere.
// TODO: Consider to use PopupWindow.setLayoutInScreenEnabled(true) so that we can
// specify the popup poision in screen coordinates.
mParent.getLocationOnScreen(mParentPositionOnScreen);
@@ -519,6 +522,10 @@ public final class FloatingToolbar {
cancelOverflowAnimations();
refreshCoordinatesAndOverflowDirection(contentRectOnScreen);
preparePopupContent();
+ // PopupWindow#update() receives the location relative to the attached window hence
+ // the following code is correct when and only when mParent is aligned to the top-left
+ // of the attached window.
+ // TODO: Fix the following logic so that mParent can be placed at anywhere.
// We need to specify the offset relative to mParent.
// TODO: Consider to use PopupWindow.setLayoutInScreenEnabled(true) so that we can
// specify the popup poision in screen coordinates.