layout state is always 0 or 3