Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在水平和垂直模式下将我的弹出列表设置到屏幕的中心。
我使用了以下代码:
android.view.WindowManager.LayoutParams params=popupDialog.getWindow().getAttributes(); params.x=heightIndp-120;params.y=top; params.gravity=Gravity.BOTTOM|Gravity.LEFT;