How to detect when the device switch from portrait to landscape mode? [duplicate]
This question already has an answer here: How to detect orientation change in layout in Android? 9 answers I have an app which shows fullscreen bitmaps in an activity. In order to provide fast loading time, I load them in the memory. But when the screen changes orientation, I would like to clear the cache in order to fill it again with bitmaps that fit inside the new dimensions. The only problem is that in order to do this, I need to detect when an orientation change occurs. Do anyone know how to detect this? See the official documentation http://developer.android.com/guide/topics/resources