If an error occurs when you rotate screen, add this code in manifest activity that you want to apply rotation