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?