Android: adjust size or content when ready to show on screen
We can override onWindowFocusChanged
method to adjust view size before showing to user.
public class MyActivity extends Activity {
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
// adjust view size
}
}
Written by Tony Zhou
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Android
Authors
Related Tags
#android
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#