Java tutorial
//package com.java2s; import android.view.View; public class Main { public static int getMeasuredHeight(View view) { if (view == null) { throw new IllegalArgumentException("view is null"); } view.measure(0, 0); return view.getMeasuredHeight(); } }