Pre-API Level 14 there is no switch preference. If I use preferences.xml to create my preference screen is there some way to distinguish between the API levels? So having a check box for old releases and a switch for API 14?
What would be the best way?
Create a
res/xml-v14/directory that contains apreferences.xmlthat has yourSwitchPreference. Create ares/xml/directory that contains apreferences.xmlfile that replaces theSwitchPreferencewith aCheckBoxPreference. Android will load the rightpreferences.xmlfile edition based on the device version the app is running on.