programmatically set layout

view story

http://stackoverflow.com – I've created four folders for different layouts, to make my app support all screens. Four folders, namely, layout(By Default), layout-large, layout-small, layout-xlarge, i've created. Inside all of them, i've put an xml file that has same name "activity_start.xml". Now, i want to set the layout programmatically using following code in my startActivity.java: DisplayMetrics displayMetrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); switch(displayMetrics.densityDpi) { case DisplayMetrics.DENSITY_LOW: // layout for (HowTos)