material-designwear-osandroid-wear-2.0

Android Wear 2.0 styled switches


I'm making a watch face for my android wear watch and in the config activity I want a switch. The switch looks like a usual android switch (picture 1) but I want it to look like the new switchs in android wear 2.0 (picture 2). How did google do them?


Solution

  • The switch in picture 2 is a SwitchPreference which is (at least currently) only supported in a PreferenceFragment.