我希望隐藏弹出窗口而不是关闭它,将其定位到位置-width,-height。当我尝试将弹出窗口移动到屏幕外时,它会停在父视图的边界处。如何将其移动到屏幕外或半屏幕外?
View view = LayoutInflater.from(getBaseContext()).inflate(R.layout.mylayout,null);
pop = new PopupWindow(this);
pop.setTouchable(false);
pop.setHeight(200);
pop.setWidth(200);
pop.setContentView(view);
pop.showAtLocation(myparentview, 0, 50, 50);
pop.update(-200,-200,-1,-1);
问题概述:无法通过0,0点
![无法通过0,0点](https://istack.dev59.com/xuUmi.webp)