package cn.flightfeather.thirdapp.util; import android.animation.Animator; import android.content.Context; import android.support.annotation.IdRes; import android.support.annotation.LayoutRes; import android.view.View; import android.view.animation.Animation; import cn.flightfeather.thirdapp.R; import razerdp.basepopup.BasePopupWindow; public class PopupGenerator extends BasePopupWindow { private int layoutId; public PopupGenerator(Context context, @LayoutRes int layoutId) { super(context, true); this.layoutId = layoutId; delayInit(); } /** *
* 返回一个contentView以作为PopupWindow的contentView *
** 该方法决定您的PopupWindow将会以怎样的动画展示出来,可以返回为 {@code null} *
** 本类提供一些简单的动画方法: *
* 如果需要用到属性动画,请覆写{@link #onCreateShowAnimator()} * * @return 返回显示PopupWindow的动画 */ @Override protected Animation onCreateShowAnimation() { return super.onCreateShowAnimation(); } /** *
* 该方法决定您的PopupWindow将会以怎样的动画展示出来(返回 {@link Animator}),可以返回为 {@code null}
*
*
* 功能详情请看{@link #onCreateShowAnimation()}
*