Adding final qualifiers to fix compiler error about these variables being used in inner classes.

PiperOrigin-RevId: 169430210
This commit is contained in:
miguely 2017-09-20 15:10:31 -04:00 committed by Miguel Yanez Barreto
parent fe8541367b
commit 3ed2e987f1
4 changed files with 13 additions and 13 deletions

View File

@ -188,8 +188,8 @@ final class IndicatorViewController {
}
private void updateCaptionViewsVisibility(
@CaptionDisplayState int captionToHide,
@CaptionDisplayState int captionToShow,
final @CaptionDisplayState int captionToHide,
final @CaptionDisplayState int captionToShow,
boolean animate) {
if (animate) {
@ -214,8 +214,8 @@ final class IndicatorViewController {
captionToShow);
captionAnimator.playTogether(captionAnimatorList);
TextView captionViewToHide = getCaptionViewFromDisplayState(captionToHide);
TextView captionViewToShow = getCaptionViewFromDisplayState(captionToShow);
final TextView captionViewToHide = getCaptionViewFromDisplayState(captionToHide);
final TextView captionViewToShow = getCaptionViewFromDisplayState(captionToShow);
captionAnimator.addListener(
new AnimatorListenerAdapter() {

View File

@ -84,12 +84,12 @@ public abstract class ExpandableBehavior extends Behavior<View> {
@CallSuper
@Override
public boolean onLayoutChild(CoordinatorLayout parent, View child, int layoutDirection) {
public boolean onLayoutChild(CoordinatorLayout parent, final View child, int layoutDirection) {
if (!ViewCompat.isLaidOut(child)) {
ExpandableWidget dep = findExpandableWidget(parent, child);
final ExpandableWidget dep = findExpandableWidget(parent, child);
if (dep != null && didStateChange(dep.isExpanded())) {
currentState = dep.isExpanded() ? STATE_EXPANDED : STATE_COLLAPSED;
@State int expectedState = currentState;
@State final int expectedState = currentState;
child
.getViewTreeObserver()
.addOnPreDrawListener(

View File

@ -108,7 +108,7 @@ public abstract class FabTransformationBehavior extends ExpandableTransformation
@NonNull
@Override
protected AnimatorSet onCreateExpandedStateChangeAnimation(
View dependency, View child, boolean expanded, boolean isAnimating) {
final View dependency, final View child, final boolean expanded, boolean isAnimating) {
FabTransformationSpec spec = onCreateMotionSpec(dependency, child, expanded);
List<Animator> animations = new ArrayList<>();
@ -274,7 +274,7 @@ public abstract class FabTransformationBehavior extends ExpandableTransformation
private void createIconFadeAnimation(
View dependency,
View child,
final View child,
boolean expanded,
boolean currentlyAnimating,
FabTransformationSpec spec,
@ -284,9 +284,9 @@ public abstract class FabTransformationBehavior extends ExpandableTransformation
return;
}
CircularRevealWidget circularRevealChild = (CircularRevealWidget) child;
final CircularRevealWidget circularRevealChild = (CircularRevealWidget) child;
ImageView dependencyImageView = (ImageView) dependency;
Drawable icon = dependencyImageView.getDrawable();
final Drawable icon = dependencyImageView.getDrawable();
ObjectAnimator animator;
@ -339,7 +339,7 @@ public abstract class FabTransformationBehavior extends ExpandableTransformation
if (!(child instanceof CircularRevealWidget)) {
return;
}
CircularRevealWidget circularRevealChild = (CircularRevealWidget) child;
final CircularRevealWidget circularRevealChild = (CircularRevealWidget) child;
float revealCenterX = calculateRevealCenterX(dependency, child, spec.positioning);
float revealCenterY = calculateRevealCenterY(dependency, child, spec.positioning);

View File

@ -68,7 +68,7 @@ public class FabTransformationScrimBehavior extends ExpandableTransformationBeha
@NonNull
@Override
protected AnimatorSet onCreateExpandedStateChangeAnimation(
View dependency, View child, boolean expanded, boolean isAnimating) {
View dependency, final View child, final boolean expanded, boolean isAnimating) {
List<Animator> animations = new ArrayList<>();
List<AnimatorListener> listeners = new ArrayList<>();