80,351
社区成员
发帖
与我相关
我的任务
分享
Display the content view in a popup window anchored to the bottom-left corner of the anchor view. If there is not enough room on screen to show the popup in its entirety, this method tries to find a parent scroll view to scroll. If no parent scroll view can be scrolled, the bottom-left corner of the popup is pinned at the top left corner of the anchor view.
mPW = new PopupWindow(v, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, false);
mPW.showAsDropDown(mNumpad);
会导致 PopupWindow 在最顶部显示,无法正常的 View 左下方显示:
(Fragment 没有留空间给 PopupWindow 显示);
等应用加载完再通过点击事件显示 PopupWindow,PopupWindow 能正常的在 Tabs 位置显示。[/quote]
你的ppw不是全屏的吗?LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT[/quote]
并没有全屏显示,通过点击事件 PopupWindow 能正常的在 Tabs 的位置显示;
我在布局文件里设置了控件的高度。[/quote]
你是不是把ppw放在你具体的一个控件里面?
mPW = new PopupWindow(v, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, false);
mPW.showAsDropDown(mNumpad);
会导致 PopupWindow 在最顶部显示,无法正常的 View 左下方显示:
(Fragment 没有留空间给 PopupWindow 显示);
等应用加载完再通过点击事件显示 PopupWindow,PopupWindow 能正常的在 Tabs 位置显示。[/quote]
你的ppw不是全屏的吗?LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT[/quote]
并没有全屏显示,通过点击事件 PopupWindow 能正常的在 Tabs 的位置显示;
我在布局文件里设置了控件的高度。
mPW = new PopupWindow(v, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, false);
mPW.showAsDropDown(mNumpad);
mPW = new PopupWindow(v, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, false);
mPW.showAsDropDown(mNumpad);
会导致 PopupWindow 在最顶部显示,无法正常的 View 左下方显示:
(Fragment 没有留空间给 PopupWindow 显示);
等应用加载完再通过点击事件显示 PopupWindow,PopupWindow 能正常的在 Tabs 位置显示。[/quote]
你的ppw不是全屏的吗?LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT