Hey all I've been looking far and wide trying to figure out how to save my preview setting's in Android Studio version:
Electric Eel 2022.1.1 Canary 3 Build #AI-213.7172.25.2211.8624637, built on May 20, 2022
Every time I change the Device For Preview to what I am always using (Lenovo Tablet API 29 in the example here):
And also change the orientation to Landscape:
Which should always stay looking like this for not just this layout but all others I have as well:
Then close Android Studio and open it again its right back to what it seems to always default to even though I changed it....
Here is a demo of me opening the Android Studies once to set the settings I am wanting it to save, saving it then exiting. I then start Android Studio again to show that it does not have my saved Device for Preview nor the orientation.
My device is setup correctly to mirror what I have chosen in the Device for Preview:
So, what am I doing wrong?
I think that is just a preview option and it doesn't save your app's orientation. But try this code and I hope it will help you.
You need to add this code in each relevant java activity of its layout.