mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
Adding final qualifiers to fix compiler error about these variables being used in inner classes.
PiperOrigin-RevId: 169430210
This commit is contained in:
parent
fe8541367b
commit
3ed2e987f1
@ -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() {
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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<>();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user