I want to have different dimensions on different orientation, I've activity_main.xml and activity_main.xml(land) too, but size is changing only when I re-launch app, it doesn't work just on rotation.
In manifest I've
android:configChanges="orientation|keyboardHidden|screenSize"
when I deleted with code, it worked properly, but in this case recyclerview content is disposing on rotation, so is there any chance to keep recyclerView content and this rotation, bot work properly?
To keep recyclerview information (scroll position, or may be your custom info) you need to use onSaveInstanceState
/onRestoreInstanceState
callbacks. To keep content you need to use memory cache or file cache (files, db) There are few cases when you truly need to use android:configChanges
.