I am making my 1st ever android app using android studio,
Everything works correctly except switching between portrait and landscape layouts.
What code do i need to insert and, where to get my app to see the layouts I have made.
Thanks Michael
I am making my 1st ever android app using android studio,
Everything works correctly except switching between portrait and landscape layouts.
What code do i need to insert and, where to get my app to see the layouts I have made.
Thanks Michael
You have to create a new folder called layout-land
and place it in there.
Ex:
Your layout's current location is layout/my_layout.xml
, you would place the corresponding landscape layout in layout-land/my_layout.xml
Check: http://developer.android.com/guide/practices/screens_support.html under "Using configuration qualifiers"
Similar Question: How do I specify different layouts for portrait and landscape orientations?