80,350
社区成员
发帖
与我相关
我的任务
分享
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:background="@drawable/ff0819"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginEnd="10dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:textAlignment="viewEnd"
android:text="@string/factory_index:"
android:textSize="@dimen/text_size_14" />
<EditText
android:id="@+id/cellInfoArfcnEditText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:layout_marginStart="2dp"
android:layout_marginTop="2dp"
android:layout_marginEnd="2dp"
android:layout_marginBottom="2dp"
android:background="@drawable/rect_corner"
android:ellipsize="end"
android:inputType="none"
android:lines="1"
android:textColor="#ff555555"
android:textColorHint="#ff999999"
android:textSize="@dimen/text_size_20" />
</LinearLayout>
{
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
View decorView = getWindow().getDecorView();
check(decorView);
System.out.println(count);
}
}, 5000);
}
int count = 0;
private void check(View view) {
count++;
if (view instanceof ViewGroup) {
ViewGroup vg = (ViewGroup) view;
for (int i = 0; i < vg.getChildCount(); i++) {
check(vg.getChildAt(i));
}
}
}