Search code examples
androidactionbarsherlock

Can I use Switch Widget with ActionBarSherlock


My application uses actionbarsherlock. My question is can I use Switch Widget, along with actionbarsherlock (switch widget appearing as part of actionbarsherlock)? Is it supported?

I have read questions regarding actionbarsherlock and switch widget, but none of them really answered my question.

If the answer is Yes, can someone point me to an example?


Solution

  • No this is not possible. The switch widget is not part of the ActionBar and therefore not part of ActionBarSherlock.

    You can only use it if you target API Level 14 or up or if you recreate it from the Android source code yourself.