2

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?

joe
  • 51
  • 6
Moussa Harajli
  • 1,486
  • 5
  • 22
  • 36
  • 1
    You can use SwitchCompat. See: http://stackoverflow.com/questions/27999583/selection-box-around-android-support-v7-widget-switchcompat – Zielony Feb 16 '15 at 20:30

1 Answers1

5

You need to use...

<android.support.v7.widget.SwitchCompat
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  ...
  android:background="@null" />
Nikunj
  • 3,937
  • 19
  • 33