2

On the page 19 of this slides from Google I/O 2011: Google I/O 2011 , we can find several controls from the Honeycomb platform. On the bottom of the page there is a switch on/off control, but I'm not able to find it at all on the 3.0 Android Platform. What am I doing wrong? Whats the proper name of this control?

Paulo Barros
  • 2,740
  • 8
  • 28
  • 36

1 Answers1

1

Seems like the Switch widget only available in Ice Cream Sandwich (API 14): http://developer.android.com/reference/android/widget/Switch.html

Michell Bak
  • 13,182
  • 11
  • 64
  • 121
  • I tried this control already, but it doesn't looks like the one of the presentation at all. Its just a button that has one text inside, and if you click it, the text changes, but it doesn't look like a switch. – Paulo Barros Oct 26 '11 at 13:09
  • Please check the page 19 of the slide I posted. There is this toggle button, but on the middle-bottom of the slide, there is the switch. – Paulo Barros Oct 26 '11 at 13:11
  • Oh sorry, I didn't see your mentioning of the specific page. I'll do some searching. – Michell Bak Oct 26 '11 at 13:12
  • Sounds and looks like the `Switch` widget to me. Altough this is new for ICS, and i didn't try it yet, so I'm not sure. Have a look. Doc: http://developer.android.com/reference/android/widget/Switch.html –  Oct 26 '11 at 13:16
  • Then why is that on the Google presentation of Honeycomb? I don't get it... But ok! Thanks a lot for the answer – Paulo Barros Oct 26 '11 at 13:18
  • No idea - perhaps it was supposed to be in Honeycomb, but was postponed. – Michell Bak Oct 26 '11 at 13:19
  • 2
    `Switch` is used internally in Honeycomb (e.g., airplane mode and WiFi toggles in the expanded system bar) but is only part of the SDK in ICS. If/when the ICS code ships, I suspect that it will be fairly simple to create a repackaged `Switch` that works on earlier versions of Android. – CommonsWare Oct 26 '11 at 14:29