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:正值為向下偏移,負值為向上偏移