I have a function to which i am passing a View as parameter. Now when i use statusView in the function  onAnimationEnd , the compiler gives a message to change the modifier of statusView to final . So i dont understand why this is necessary?
private void showProgress(Context c, View statusView) {
            statusView.setVisibility(View.VISIBLE);
            statusView.animate().setDuration(shortAnimTime)
                    .alpha(show ? 1 : 0)
                    .setListener(new AnimatorListenerAdapter() {
                        @Override
                        public void onAnimationEnd(Animator animation) {
                            statusView.setVisibility(show ? View.VISIBLE
                                    : View.GONE);
                        }
                    });
}
 
    