Search code examples
androidandroid-layoutandroid-api-levels

Exclusive Layouts for certain api level - Android


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.

Thanks


Solution

  • 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:

    http://android-developers.blogspot.fr/2012/07/getting-your-app-ready-for-jelly-bean.html