XPopup
XPopup copied to clipboard
使用AttachPopupView,所依附的view下的弹框有时候会偏移
XPopup版本 如2.3.2
new XPopup.Builder(getContext()) .hasShadowBg(false) .isClickThrough(false) .popupAnimation(PopupAnimation.ScaleAlphaFromCenter) .popupPosition(PopupPosition.Bottom) .atView(view) .asCustom(new DrugTypePopup(getContext(), new DrugTypePopup.OnSelectListener() { @Override public void onSelect(int position, int id, String text) { Log.e("text", "====" + position + "|" + id + "|" + text); } })) .show();
设置本来是在正下方显示,但是偶尔会便宜。
@penglei60 用最新版本试试
你好,更新最新版本2.7.2时,也会偶尔出现偏移情况。
new XPopup.Builder(getContext()) .hasShadowBg(false) .isClickThrough(false) .hasStatusBar(true) .hasNavigationBar(true) .popupAnimation(PopupAnimation.ScaleAlphaFromCenter) .popupPosition(PopupPosition.Bottom) .atView(view) .asCustom(new DrugTypePopup(getContext(), new DrugTypePopup.OnSelectListener() { @Override public void onSelect(int position, int id, String text) { Log.e("text", "====" + position + "|" + id + "|" + text); } })) .show();
设置参数是否正确,帮忙看一下。就是偶尔会偏移到右下角展示。
@penglei60 机型说下
使用的是华为平板,型号:BAH3-W59。 目前我使用的是最新版本2.7.2。目前我的解决方法是,设置固定的pop xml的宽度和高度,测试可满足需求,暂时还没出现偏移到屏幕外的情况。