I've got an app made for tablets, where I'm using RelativeLayout. For smaller screens I'd made TabLayout where that RelativeLayout is splitted on 3 tabs. That 3 tabs are 3 separated xml files. My problem is connecting code to both layouts. On tablet, everything is in one xml so I can e.g. call:
setContentView(R.layout.tablet_layout);
button = (Button) findViewById(R.id.btn1);
but for smaller screens it is in three xml files so it won't work like that. Is it possible to do something with that?