ADD week 5
This commit is contained in:
7
02-Easy5/E5/sources/androidx/viewbinding/R.java
Normal file
7
02-Easy5/E5/sources/androidx/viewbinding/R.java
Normal file
@ -0,0 +1,7 @@
|
||||
package androidx.viewbinding;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class R {
|
||||
private R() {
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package androidx.viewbinding;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public interface ViewBinding {
|
||||
View getRoot();
|
||||
}
|
25
02-Easy5/E5/sources/androidx/viewbinding/ViewBindings.java
Normal file
25
02-Easy5/E5/sources/androidx/viewbinding/ViewBindings.java
Normal file
@ -0,0 +1,25 @@
|
||||
package androidx.viewbinding;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class ViewBindings {
|
||||
private ViewBindings() {
|
||||
}
|
||||
|
||||
public static <T extends View> T findChildViewById(View view, 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user