Android examples for User Interface:View Size
prepare View To Get Size
//package com.java2s; import android.view.View; public class Main { public static void prepareViewToGetSize(View view) { view.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED), View.MeasureSpec .makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)); view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight()); }/*from w w w . jav a 2s. c o m*/ }