PopupWindow 设置显示坐标为负无效

  • WindowManager显示负坐标,需要设置

    • LayoutParams flag为FLAG_LAYOUT_NO_LIMITS
    • LayoutParams type为2007以上
  • PopupWindow 也是设置WindowManager的,查看了内部代码,
    .PopupWindow 设置显示坐标为负无效
    • 要设置flag为FLAG_LAYOUT_NO_LIMITS,则需要在setContentView
      之前设置thissetClippingEnabled(false);

猜你喜欢

转载自blog.51cto.com/xuguohongai/2518521