开发者

Android: PopupWindow.showAtLocation(anchorView) -> how to get the whole screen as a anchorView?

I have PopupWindow, which I'd like to place in the center of the screen. However, I only have access to the KeyboardView (since I'm开发者_开发问答 implementing an IME) at the bottom of the screen and whenever I center my PopupWindow by using the KeyboardView and Gravity.CENTER it is of course only centered above the keyboard, but not in the whole screen.

Is there a way to get the whole screen as an anchor view?


You cannot do this with a popup window. You should create your own window using a WindowManager instance.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜