Exclusive Layouts for certain api level – Android-ThrowExceptions

Exception or error:

I have a Layout that I would like to use only for tablets. I know that if create a folder “layout-v(api level)” that layout will be used only for that specific api. the thing is, for tablets, either you have api 11, 12, or 13. Is there a way I can create a folder that includes all of these instead of creating layout-v11, layout-v12, layout-v13 ?

Hope my question is not confusing, i just dont know how to put my question any other way.


How to solve:

Don’t forget that you can have a 4″ android device with API lvl 14. So using API version to distinct tablets and phones is not a good way.

Prefer the distinction with screen resolution. A good post about it is on the Android developers blog:



If you use layout-v11 it will be used for all versions >= 11 unless a higher version is specified (e.g. layout_v14). So you should only need to make the one folder, layout-v11.

Leave a Reply

Your email address will not be published. Required fields are marked *