1、首先,肯定要有动画资源吧,要不怎么弹嘞。啥都不管,先定义两个动画肯定用的着。<?xml version="1.0" encoding="utf-8"?>
android:duration="500"
android:fromYDelta="100%p"
android:toYDelta="0" /><?xml version="1.0" encoding="utf-8"?>
android:duration="500"
android:fromYDelta="0"
android:toYDelta="50%p" />
2、将上面两个动画加载到我们的PopupWindow上吧,可以在styles文件下定义
@anim/push_bottom_in
@anim/push_buttom_out
3、PopupWindow的布局<?xml version="1.0" encoding="utf-8"?>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal">
android:id="@+id/id_pop_layout&