Example code for Dialog under rotation