당신은 당신의 레이아웃의 루트 요소에 ID를 할당하고 그 통해 액세스 할 수 있습니다
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/Root"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="1"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="2"/>
</LinearLayout>
그런 다음 활동에 당신이 할 수있는 일 같은 :
var root = FindViewById<LinearLayout>(Resource.Id.Root);
for (int i = 0; i < root.ChildCount; i++)
{
Console.WriteLine(root.GetChildAt(i).Id);
}