mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-14 01:47:17 +01:00
29 lines
850 B
Java
29 lines
850 B
Java
package androidx.viewbinding;
|
|
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import androidx.annotation.IdRes;
|
|
import androidx.annotation.Nullable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes14.dex */
|
|
public class ViewBindings {
|
|
private ViewBindings() {
|
|
}
|
|
|
|
@Nullable
|
|
public static <T extends View> T findChildViewById(View view, @IdRes int i) {
|
|
if (!(view instanceof ViewGroup)) {
|
|
return null;
|
|
}
|
|
ViewGroup viewGroup = (ViewGroup) view;
|
|
int childCount = viewGroup.getChildCount();
|
|
for (int i2 = 0; i2 < childCount; i2++) {
|
|
T t = (T) viewGroup.getChildAt(i2).findViewById(i);
|
|
if (t != null) {
|
|
return t;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|