Android examples for User Interface:Layout
request layout for all view
//package com.java2s; import android.view.View; import android.view.ViewGroup; public class Main { public static void requestLayoutAllRecurse(View aView) { if (aView != null && aView instanceof ViewGroup) { int cnt = ((ViewGroup) aView).getChildCount(); for (int i = 0; i < cnt; i++) { View child = ((ViewGroup) aView).getChildAt(i); if (child != null && child instanceof ViewGroup) { requestLayoutAllRecurse(child); } else if (child != null) { child.requestLayout(); }/* w w w. j a v a2s. c om*/ } } } public static void requestLayout(View aView) { if (aView != null) { aView.requestLayout(); } } }