[Android] The very first point to get width/height in activity life-cycle

No need to say much, read the code and find out thing.

 

@Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); Log.e(“Height”, ” >> ” + mParentView.getMeasuredHeight()); Log.e(“Width”, ” >> ” + mParentView.getMeasuredWidth()); }

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: