diff --git a/Phoenix/src/main/java/com/yalantis/phoenix/PullToRefreshView.java b/Phoenix/src/main/java/com/yalantis/phoenix/PullToRefreshView.java index 14d5545..4d33313 100644 --- a/Phoenix/src/main/java/com/yalantis/phoenix/PullToRefreshView.java +++ b/Phoenix/src/main/java/com/yalantis/phoenix/PullToRefreshView.java @@ -418,7 +418,7 @@ private void setRefreshing(boolean refreshing, final boolean notify) { } } - private Animation.AnimationListener mToStartListener = new Animation.AnimationListener() { + private final Animation.AnimationListener mToStartListener = new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { } diff --git a/Phoenix/src/main/java/com/yalantis/phoenix/refresh_view/BaseRefreshView.java b/Phoenix/src/main/java/com/yalantis/phoenix/refresh_view/BaseRefreshView.java index 5b0ea29..3469f00 100644 --- a/Phoenix/src/main/java/com/yalantis/phoenix/refresh_view/BaseRefreshView.java +++ b/Phoenix/src/main/java/com/yalantis/phoenix/refresh_view/BaseRefreshView.java @@ -11,7 +11,7 @@ public abstract class BaseRefreshView extends Drawable implements Drawable.Callback, Animatable { - private PullToRefreshView mRefreshLayout; + private final PullToRefreshView mRefreshLayout; private boolean mEndOfRefreshing; public BaseRefreshView(Context context, PullToRefreshView layout) { diff --git a/Phoenix/src/main/java/com/yalantis/phoenix/refresh_view/SunRefreshView.java b/Phoenix/src/main/java/com/yalantis/phoenix/refresh_view/SunRefreshView.java index 74e20c2..e523588 100644 --- a/Phoenix/src/main/java/com/yalantis/phoenix/refresh_view/SunRefreshView.java +++ b/Phoenix/src/main/java/com/yalantis/phoenix/refresh_view/SunRefreshView.java @@ -38,8 +38,8 @@ public class SunRefreshView extends BaseRefreshView implements Animatable { private static final Interpolator LINEAR_INTERPOLATOR = new LinearInterpolator(); - private PullToRefreshView mParent; - private Matrix mMatrix; + private final PullToRefreshView mParent; + private final Matrix mMatrix; private Animation mAnimation; private int mTop; @@ -54,7 +54,7 @@ public class SunRefreshView extends BaseRefreshView implements Animatable { private float mTownFinalTopOffset; private float mTownMoveOffset; - private int mSunSize = 100; + private final int mSunSize = 100; private float mSunLeftOffset; private float mSunTopOffset; diff --git a/app/src/main/java/com/tellh/android_pulltorefreshlibrary_collection/PullToRefreshLayoutTellH/PullToRefreshLayout.java b/app/src/main/java/com/tellh/android_pulltorefreshlibrary_collection/PullToRefreshLayoutTellH/PullToRefreshLayout.java index eacfccd..671f5d7 100644 --- a/app/src/main/java/com/tellh/android_pulltorefreshlibrary_collection/PullToRefreshLayoutTellH/PullToRefreshLayout.java +++ b/app/src/main/java/com/tellh/android_pulltorefreshlibrary_collection/PullToRefreshLayoutTellH/PullToRefreshLayout.java @@ -435,7 +435,7 @@ public void run() { } } - private Animation.AnimationListener mToStartListener = new Animation.AnimationListener() { + private final Animation.AnimationListener mToStartListener = new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { } @@ -450,7 +450,7 @@ public void onAnimationEnd(Animation animation) { } }; - private Animation.AnimationListener mReadyToRefreshListener= new Animation.AnimationListener() { + private final Animation.AnimationListener mReadyToRefreshListener= new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { diff --git a/app/src/main/java/com/tellh/android_pulltorefreshlibrary_collection/WaterDropListView/WaterDropListView.java b/app/src/main/java/com/tellh/android_pulltorefreshlibrary_collection/WaterDropListView/WaterDropListView.java index 87df9da..73d0c9e 100644 --- a/app/src/main/java/com/tellh/android_pulltorefreshlibrary_collection/WaterDropListView/WaterDropListView.java +++ b/app/src/main/java/com/tellh/android_pulltorefreshlibrary_collection/WaterDropListView/WaterDropListView.java @@ -33,7 +33,7 @@ public class WaterDropListView extends ListView implements OnScrollListener,Wate // header view content, use it to calculate the Header's height. And hide it // when disable pull refresh. // private RelativeLayout mHeaderViewContent; - private boolean mEnablePullRefresh = true; + private final boolean mEnablePullRefresh = true; // private boolean mPullRefreshing = false; // is refreashing. // -- footer view diff --git a/circlerefreshlayout/src/main/java/com/tuesda/walker/circlerefresh/CircleRefreshLayout.java b/circlerefreshlayout/src/main/java/com/tuesda/walker/circlerefresh/CircleRefreshLayout.java index 17c7964..862af6a 100644 --- a/circlerefreshlayout/src/main/java/com/tuesda/walker/circlerefresh/CircleRefreshLayout.java +++ b/circlerefreshlayout/src/main/java/com/tuesda/walker/circlerefresh/CircleRefreshLayout.java @@ -63,7 +63,7 @@ public class CircleRefreshLayout extends FrameLayout { private ValueAnimator mUpBackAnimator; private ValueAnimator mUpTopAnimator; - private DecelerateInterpolator decelerateInterpolator = new DecelerateInterpolator(10); + private final DecelerateInterpolator decelerateInterpolator = new DecelerateInterpolator(10); public CircleRefreshLayout(Context context) { this(context, null, 0); diff --git a/swipetorefreshlayoutgoogle/src/main/java/com/tellh/swipetorefreshlayoutgoogle/CircleImageView.java b/swipetorefreshlayoutgoogle/src/main/java/com/tellh/swipetorefreshlayoutgoogle/CircleImageView.java index 9512385..f4c2612 100644 --- a/swipetorefreshlayoutgoogle/src/main/java/com/tellh/swipetorefreshlayoutgoogle/CircleImageView.java +++ b/swipetorefreshlayoutgoogle/src/main/java/com/tellh/swipetorefreshlayoutgoogle/CircleImageView.java @@ -125,9 +125,9 @@ public void setBackgroundColor(int color) { } private class OvalShadow extends OvalShape { - private RadialGradient mRadialGradient; - private Paint mShadowPaint; - private int mCircleDiameter; + private final RadialGradient mRadialGradient; + private final Paint mShadowPaint; + private final int mCircleDiameter; public OvalShadow(int shadowRadius, int circleDiameter) { super(); diff --git a/taurus_flyplane/src/main/java/com/yalantis/taurus/RefreshView.java b/taurus_flyplane/src/main/java/com/yalantis/taurus/RefreshView.java index fd18f35..9edff22 100644 --- a/taurus_flyplane/src/main/java/com/yalantis/taurus/RefreshView.java +++ b/taurus_flyplane/src/main/java/com/yalantis/taurus/RefreshView.java @@ -51,10 +51,10 @@ public class RefreshView extends Drawable implements Drawable.Callback, Animatab private static final int MAX_WIND_X_OFFSET = 2000; private static final int RANDOM_Y_COEFFICIENT = 5; - private Context mContext; - private PullToRefreshView mParent; - private Matrix mMatrix; - private Matrix mAdditionalMatrix; + private final Context mContext; + private final PullToRefreshView mParent; + private final Matrix mMatrix; + private final Matrix mAdditionalMatrix; private Animation mAnimation; private int mTop; @@ -62,8 +62,8 @@ public class RefreshView extends Drawable implements Drawable.Callback, Animatab private boolean mInverseDirection; //KEY: Y position, Value: X offset of wind - private Map mWinds; - private Paint mWindPaint; + private final Map mWinds; + private final Paint mWindPaint; private float mWindLineWidth; private boolean mNewWindSet; @@ -88,7 +88,7 @@ public class RefreshView extends Drawable implements Drawable.Callback, Animatab private float mLoadingAnimationTime; private float mLastAnimationTime; - private Random mRandom; + private final Random mRandom; private boolean mEndOfRefreshing; private enum AnimationPart {