当前位置: 代码迷 >> Android >> 为什么在一个自定义view里面popupWindow.showAsDropDown方法Y值不能固定解决方案
  详细解决方案

为什么在一个自定义view里面popupWindow.showAsDropDown方法Y值不能固定解决方案

热度:11   发布时间:2016-05-01 21:23:23.0
为什么在一个自定义view里面popupWindow.showAsDropDown方法Y值不能固定
我在一个自定义VIEW里面绑定了一个popupWindow 弹出一个listview
但是绑定popupWindow.showAsDropDown无法锁定listview的坐标
popupWindow.showAsDropDown(listView,(int)spinnerX,(int)spinnerY);
popupWindow.showAsDropDown(view);
popupWindow.showAtLocation(listView,Gravity.LEFT,(int)spinnerX,(int)spinnerY);
这三种方法都用了···都是Y坐标的位置偏差很大···
请问如何解决

------解决方案--------------------
刚刚我搜到的,写的详细的描述,你可以看看。Android下PopupWindow隐藏及显示(showAtLocation/showAsDropDown)
  相关解决方案