开发者

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

开发者 https://www.devze.com 2023-01-19 15:55 出处:网络
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 an

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

精彩评论

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

关注公众号