alexandroid/decompiled/jadx/sources/androidx/databinding/adapters/ViewGroupBindingAdapter.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

111 lines
5.4 KiB
Java

package androidx.databinding.adapters;
import android.animation.LayoutTransition;
import android.annotation.TargetApi;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import androidx.annotation.RestrictTo;
import androidx.databinding.BindingAdapter;
import androidx.databinding.BindingMethod;
import androidx.databinding.BindingMethods;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@BindingMethods({@BindingMethod(attribute = "android:alwaysDrawnWithCache", method = "setAlwaysDrawnWithCacheEnabled", type = ViewGroup.class), @BindingMethod(attribute = "android:animationCache", method = "setAnimationCacheEnabled", type = ViewGroup.class), @BindingMethod(attribute = "android:splitMotionEvents", method = "setMotionEventSplittingEnabled", type = ViewGroup.class)})
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes13.dex */
public class ViewGroupBindingAdapter {
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public interface OnAnimationEnd {
void onAnimationEnd(Animation animation);
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public interface OnAnimationRepeat {
void onAnimationRepeat(Animation animation);
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public interface OnAnimationStart {
void onAnimationStart(Animation animation);
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public interface OnChildViewAdded {
void onChildViewAdded(View view, View view2);
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public interface OnChildViewRemoved {
void onChildViewRemoved(View view, View view2);
}
@BindingAdapter({"android:animateLayoutChanges"})
@TargetApi(11)
public static void setAnimateLayoutChanges(ViewGroup viewGroup, boolean z) {
if (z) {
viewGroup.setLayoutTransition(new LayoutTransition());
} else {
viewGroup.setLayoutTransition(null);
}
}
@BindingAdapter(requireAll = false, value = {"android:onAnimationStart", "android:onAnimationEnd", "android:onAnimationRepeat"})
public static void setListener(ViewGroup viewGroup, final OnAnimationStart onAnimationStart, final OnAnimationEnd onAnimationEnd, final OnAnimationRepeat onAnimationRepeat) {
if (onAnimationStart == null && onAnimationEnd == null && onAnimationRepeat == null) {
viewGroup.setLayoutAnimationListener(null);
} else {
viewGroup.setLayoutAnimationListener(new Animation.AnimationListener() { // from class: androidx.databinding.adapters.ViewGroupBindingAdapter.2
@Override // android.view.animation.Animation.AnimationListener
public void onAnimationEnd(Animation animation) {
OnAnimationEnd onAnimationEnd2 = onAnimationEnd;
if (onAnimationEnd2 != null) {
onAnimationEnd2.onAnimationEnd(animation);
}
}
@Override // android.view.animation.Animation.AnimationListener
public void onAnimationRepeat(Animation animation) {
OnAnimationRepeat onAnimationRepeat2 = onAnimationRepeat;
if (onAnimationRepeat2 != null) {
onAnimationRepeat2.onAnimationRepeat(animation);
}
}
@Override // android.view.animation.Animation.AnimationListener
public void onAnimationStart(Animation animation) {
OnAnimationStart onAnimationStart2 = OnAnimationStart.this;
if (onAnimationStart2 != null) {
onAnimationStart2.onAnimationStart(animation);
}
}
});
}
}
@BindingAdapter(requireAll = false, value = {"android:onChildViewAdded", "android:onChildViewRemoved"})
public static void setListener(ViewGroup viewGroup, final OnChildViewAdded onChildViewAdded, final OnChildViewRemoved onChildViewRemoved) {
if (onChildViewAdded == null && onChildViewRemoved == null) {
viewGroup.setOnHierarchyChangeListener(null);
} else {
viewGroup.setOnHierarchyChangeListener(new ViewGroup.OnHierarchyChangeListener() { // from class: androidx.databinding.adapters.ViewGroupBindingAdapter.1
@Override // android.view.ViewGroup.OnHierarchyChangeListener
public void onChildViewAdded(View view, View view2) {
OnChildViewAdded onChildViewAdded2 = OnChildViewAdded.this;
if (onChildViewAdded2 != null) {
onChildViewAdded2.onChildViewAdded(view, view2);
}
}
@Override // android.view.ViewGroup.OnHierarchyChangeListener
public void onChildViewRemoved(View view, View view2) {
OnChildViewRemoved onChildViewRemoved2 = onChildViewRemoved;
if (onChildViewRemoved2 != null) {
onChildViewRemoved2.onChildViewRemoved(view, view2);
}
}
});
}
}
}