Fixed a bug with the location of the list dropdown

pull/14/head
Sam Bosley 14 years ago
parent e61a42d3f5
commit eabc0af176

@ -62,6 +62,10 @@ public class HelpInfoPopover extends QuickActionWidget {
return mRect.width() / 2; return mRect.width() / 2;
} }
protected int getShowAtX() {
return mRect.left;
}
@Override @Override
protected void onMeasureAndLayout(Rect anchorRect, View contentView) { protected void onMeasureAndLayout(Rect anchorRect, View contentView) {
contentView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); contentView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));

@ -244,12 +244,16 @@ public abstract class QuickActionWidget extends PopupWindow {
prepareAnimationStyle(); prepareAnimationStyle();
try { try {
showAtLocation(anchor, Gravity.NO_GRAVITY, mRect.left, mPopupY); showAtLocation(anchor, Gravity.NO_GRAVITY, getShowAtX(), mPopupY);
} catch (Exception e) { } catch (Exception e) {
Log.w("quick-action-show", e); Log.w("quick-action-show", e);
} }
} }
protected int getShowAtX() {
return 0;
}
protected void clearQuickActions() { protected void clearQuickActions() {
if (!mQuickActions.isEmpty()) { if (!mQuickActions.isEmpty()) {
onClearQuickActions(); onClearQuickActions();

Loading…
Cancel
Save