@Override
                                public void onAnimationUpdate(ValueAnimator animation) {
                                    if (!isShow || getDialogImpl() == null || getDialogImpl().boxBody == null)
                                        return;
                                    float animatedValue = (float) animation.getAnimatedValue();
                                    isEnterAnimRunning = !(animatedValue == 1f);
                                    DialogXViewLoc loc = getMenuLoc();

                                    int aimHeight = animatedValue == 1f ? ViewGroup.LayoutParams.WRAP_CONTENT : (int) (targetHeight * animatedValue);
                                    boxBody.getLayoutParams().height = aimHeight;
                                    boxBody.getLayoutParams().width = getWidth() == -1 ? baseView().getWidth() : getWidth();
                                    if ((boxBody.getY() + aimHeight) > boxRoot.getSafeHeight()) {
                                        boxBody.setY(boxRoot.getSafeHeight() - aimHeight);
                                    }
                                    float calX = loc.getX() != -1 ? loc.getX() : baseViewLoc.getX();
                                    float calY = baseViewLoc.getY() + selectItemYDeviation * animatedValue;

                                    if (!offScreen) {
                                        if (calX < 0) {
                                            calX = 0;
                                        }
                                        if (calY < 0) {
                                            calY = 0;
                                        }
                                        if ((calX + boxBody.getWidth()) > boxRoot.getUseAreaWidth()) {
                                            calX = boxRoot.getUseAreaWidth() - boxBody.getWidth();
                                        }
                                        if ((calY + boxBody.getHeight()) > boxRoot.getUseAreaHeight()) {
                                            calY = boxRoot.getUseAreaHeight() - boxBody.getHeight();
                                        }
                                    }
                                    boxBody.setX(calX);
                                    boxBody.setY(calY);

                                    boxBody.requestLayout();
                                    if (boxBody.getVisibility() != VISIBLE) {
                                        boxBody.setVisibility(View.VISIBLE);
                                    }

                                    if (isUseBlurBackground()) {
                                        boxRoot.setBkgAlpha((Float) animation.getAnimatedValue());
                                    }
                                }
@author: Kongzue
@github: https://github.com/kongzue/
@homepage: http://kongzue.com/
@mail: myzcxhh@live.cn
@createTime: 2021/8/18 14:27
DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopMenu.java