title: Manage different Views/Widgets for different screen orientations in Android?
body: <p>Let's say I define two layouts with the same name, and place one of them in "layout-land" directory.</p>
  
  <p>If the two layout files contain the same Views (and views ids), then my fragment/activity will find them and there will be no problem there.</p>
  
  <p>However, I'm facing a situation where portrait and landscape designs are really different and I need to change the custom view / widget types implemented in each layout file.</p>
  
  <p>If views ids or view types are different, or not found, it could lead to NullPointer exceptions or ClassCast exceptions.</p>
  
  <p>I don't like the idea of checking types or nulls in my fragment code, and I thought there must be a better way to do this but I haven't found it yet.</p>
  
  <p>Does anyone know a "cool" or at least more elegant way to achieve this?</p>
  
  <p>Thanks !</p>