public class MeasureUtil {
public static void measure(String tag, View view){
int w = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
int h = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
view.measure(w, h);
int width = view.getMeasuredWidth();
int height = view.getMeasuredHeight();
Log.d(tag, "width="+width+" / height="+height);
}
}