Merge "Fix location for ActionMenuItemView cheat sheet" into mnc-dev

This commit is contained in:
Chris Banes
2015-06-10 08:12:48 +00:00
committed by Android (Google) Code Review

View File

@@ -273,7 +273,8 @@ public class ActionMenuItemView extends TextView
Toast cheatSheet = Toast.makeText(context, mItemData.getTitle(), Toast.LENGTH_SHORT);
if (midy < displayFrame.height()) {
// Show along the top; follow action buttons
cheatSheet.setGravity(Gravity.TOP | Gravity.END, referenceX, height);
cheatSheet.setGravity(Gravity.TOP | Gravity.END, referenceX,
screenPos[1] + height - displayFrame.top);
} else {
// Show along the bottom center
cheatSheet.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, height);