简单的记一下Popupwindow的showAsDropDown

2016-11-18  本文已影响87人  BertSir
public void showAsDropDown(View anchor, intxoff, intyoff) {

      showAsDropDown(anchor,xoff,yoff,DEFAULT_ANCHORED_GRAVITY);

}

anchor:需要显示的父控件(简单说就是要把popupwindow显示在哪个view下面)

intxoff: 正值为向右偏移,负值为向左偏移

intyoff:正值为向下偏移,负值为向上偏移

上一篇下一篇

猜你喜欢

热点阅读