效果:
public void showNotification() {
// 获取Service
final WindowManager mWindowManager = (WindowManager) getApplication().getSystemService(Context.WINDOW_SERVICE);
LayoutInflater layoutInflater = this.getLayoutInflater();
final View view = layoutInflater.inflate(R.layout.activity_giftmoney_ranklist_footer_item, null);
final ObjectAnimator o = ObjectAnimator.ofFloat(view, "translationY", -150, 0f);
o.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
final ObjectAnimator o2 = ObjectAnimator.ofFloat(view, "translationY", 0f, -15