Is it possible to use Switch widget in Android honeycomb 3.x?

128 Views Asked by At

It always give me the following exception in runtime:

android.view.InflateException: Binary XML file exception line #291: Error inflating class android.widget.Switch

However, I added the latest Android Support Library to my project but it did not contain the Switch widget feature. I think Google did not add it yet to the Support Library.

2

There are 2 best solutions below

0
Nadeem Iqbal On BEST ANSWER

You can not use switch < 4.0

But however these are custom projects of switch you can use...

Pre Android Switch and android-switch-backport

0
Anton Savin On

Switch widget is unavailable on Android prior to API 14, it's also not included in support library. Though there are some backports which you can find here: What is the best backport of Android switch widget for 2.2?