Set layout only after resizing is over