alexandroid/decompiled/jadx/sources/com/google/android/material/carousel/CarouselStrategy.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

76 lines
2.1 KiB
Java

package com.google.android.material.carousel;
import android.content.Context;
import android.view.View;
import androidx.annotation.FloatRange;
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes7.dex */
public abstract class CarouselStrategy {
private float smallSizeMax;
private float smallSizeMin;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public enum StrategyType {
CONTAINED,
UNCONTAINED
}
public static int[] doubleCounts(int[] iArr) {
int length = iArr.length;
int[] iArr2 = new int[length];
for (int i = 0; i < length; i++) {
iArr2[i] = iArr[i] * 2;
}
return iArr2;
}
@FloatRange(from = 0.0d, to = 1.0d)
public static float getChildMaskPercentage(float f, float f2, float f3) {
return 1.0f - ((f - f3) / (f2 - f3));
}
public float getSmallItemSizeMax() {
return this.smallSizeMax;
}
public float getSmallItemSizeMin() {
return this.smallSizeMin;
}
public StrategyType getStrategyType() {
return StrategyType.CONTAINED;
}
public void initialize(Context context) {
float f = this.smallSizeMin;
if (f <= 0.0f) {
f = CarouselStrategyHelper.getSmallSizeMin(context);
}
this.smallSizeMin = f;
float f2 = this.smallSizeMax;
if (f2 <= 0.0f) {
f2 = CarouselStrategyHelper.getSmallSizeMax(context);
}
this.smallSizeMax = f2;
}
@NonNull
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
public abstract KeylineState onFirstChildMeasuredWithMargins(@NonNull Carousel carousel, @NonNull View view);
public void setSmallItemSizeMax(float f) {
this.smallSizeMax = f;
}
public void setSmallItemSizeMin(float f) {
this.smallSizeMin = f;
}
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
public boolean shouldRefreshKeylineState(@NonNull Carousel carousel, int i) {
return false;
}
}