Fixed a bug with the location of the list dropdown

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

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

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

Loading…
Cancel
Save