public void showAsDropDown(View anchor, intxoff, intyoff) {
showAsDropDown(anchor,xoff,yoff,DEFAULT_ANCHORED_GRAVITY);
}
anchor:需要显示的父控件(简单说就是要把popupwindow显示在哪个view下面)
intxoff: 正值为向右偏移,负值为向左偏移
intyoff:正值为向下偏移,负值为向上偏移
public void showAsDropDown(View anchor, intxoff, intyoff) {
showAsDropDown(anchor,xoff,yoff,DEFAULT_ANCHORED_GRAVITY);
}
anchor:需要显示的父控件(简单说就是要把popupwindow显示在哪个view下面)
intxoff: 正值为向右偏移,负值为向左偏移
intyoff:正值为向下偏移,负值为向上偏移