You can set a different android:tag attribute on the views in each different resource file, and read the tag back at runtime with View.getTag().
Example:
layout-xlarge-land/my_act.xml
layout-xlarge/my_act.xml
MyActivity.java
String tag = view.getTag();
if (tag.equals("xlarge-landscape") {
...
}