错误在最后一行显示为
变量结果可能尚未初始化
这是我的代码:
public static void animateLayoutHeight(final View view, int i) {
final ValueAnimator ofInt = ValueAnimator.ofInt(new int[]{0, i});
ofInt.setDuration(500);
ofInt.setInterpolator(new AccelerateDecelerateInterpolator());
ofInt.addListener(new AnimatorListenerAdapter() {
public void onAnimationStart(Animator animator) {
view.setVisibility(0);
}
});
ofInt.addUpdateListener(new AnimatorUpdateListener(view) {
private final /* synthetic */ View f$0;
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
AnimationUtility.lambda$animateLayoutHeight$0(this.f$0, valueAnimator);
}
});
ofInt.start();
}