I can think to one thing at this moment. Are you using android:configChanges="screenSize|orientation" in the manifest for that activity to avoid recreation of the list/adapter ?
Rotating device won't load the land or port layout
-
30-07-2022 - |
質問
I've a class MyClass
that extends ListActivity
.
The list use 2 different xml for every row, depending to the device orientation:
layout-land/row_layout.xml
layout-port/row_layout.xml
I want that if the device is vertical the list will show the xml layout in the folder layout-port and if the device is horizontal the list will show the xml layout in the folder layout-land.
But this doesn't happen. My activity will always show layout-port/row_layout.xml
, also after that I rotate the device from vertical to horizontal.
Should I use a particular method triggered on rotating device?
解決
所属していません StackOverflow