Two columns for ListView or TableLayout in Landscape mode-Collection of common programming errors
I recommend using a ListView rather than a TableLayout, since ListViews only create enough Views to fill the screen while a TableLayout will create every resource whether they are visible or not. In this way a TableLayout is slower and might even crash your app.
You can check the device’s orientation with one of the answers from: Check orientation on Android phone. Then if the orientation is:
- landscape, load your double View layout.
- portrait, load your basic, single View layout.
Loading different layouts in a ListView requires a simple custom Adapter. If you haven’t written one before, here is a tutorial to help you.