Android examples for android.view:ViewGroup
print ViewGroup Child Rect
import android.content.Context; import android.graphics.Rect; import android.util.Log; import android.view.MotionEvent; import android.view.ViewGroup; public class Main{ public static void printChildRect(ViewGroup parent, final String tag) { for (int i = 0; i < parent.getChildCount(); ++i) { Rect childRect = new Rect(); parent.getChildAt(i).getHitRect(childRect); }//from w ww. j a va 2 s.co m } }