Last Updated: February 25, 2016
·
362
· zhlwish

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 
    }
}