Let's say I define two layouts with the same name, and place one of them in "layout-land" directory.
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.
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.
If views ids or view types are different, or not found, it could lead to NullPointer exceptions or ClassCast exceptions.
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.
Does anyone know a "cool" or at least more elegant way to achieve this?
Thanks !