I want to get the tab content i.e. framelayout’s height and width in the first tab’s activity. But it always returns 0. I know that we cannot call getHeight() or getMeasuredHeight() in onCreate() because the view isnt drawn yet, but then when to call it ? In activity I dont have access to onDraw or onMeasure method, so how and when can I access the height and width ?
Share
http://developer.android.com/reference/android/view/ViewTreeObserver.OnGlobalLayoutListener.html You can refer to this ….
Note : The
onGlobalLayout()will be called if there is