Using the Material Design Switch Toggle on previous versions

1.5k Views Asked by At

I am creating a material design app while using the AppCompat support library to support devices running froyo and up. I have came across a challenge, since i am creating a material design app, i need to use the material design elements. Is there any way to use the Material Design Switch on devices that are not running lollipop?

1

There are 1 best solutions below

0
Nikunj On

You need to use...

<android.support.v7.widget.SwitchCompat
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  ...
  android:background="@null" />