You can include tags on widgets at one of your layout file with different qualifiers and check those tags on runtime.
layout-large/layout1.xml:
<Button
android:id="@+id/btn1"
...
android:tag="large" />
layout-small/layout1.xml:
<Button
android:id="@+id/btn1"
...
android:tag="small" />
Check them at runtime:
findViewById(R.id.btn1).getTag().toString()