@Override public void onCreate(Bundle savedInstanceState) { final View view = findViewById(...) view.post(new Runnable() { @Override public void run() { int width = view.getWidth(); int height = view.getHeight(); ... } }); }