From 07e7021e062dd3579f662502b15c0682c4672cfe Mon Sep 17 00:00:00 2001 From: Andrew Solovay Date: Wed, 8 Jul 2015 12:49:21 -0700 Subject: docs: Clarified how to find out when a switch is toggled Per Chris, the existing doc was incorrect: you *can't* check for a button press and a switch flip the same way. (The button triggers a click event, but the switch does not.) Chris suggested that we just remove the reference to onClick and suggest using a listener for both kinds of buttons (ToggleButton and Switch). Also pulled one note out of a section where it didn't fit (the bit about changing a button/switch's state programmatically didn't have much to do with listening for clicks) and put it at the top, and I fixed a Javadoc typo for a relevant class that I happened to notice. See first comment for doc stage location. bug: 20625504 Change-Id: I9c8975111381e5b169f6a61454ef3a93da635759 --- core/java/android/widget/Switch.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/java/android/widget/Switch.java b/core/java/android/widget/Switch.java index 7a22224..585a84d 100644 --- a/core/java/android/widget/Switch.java +++ b/core/java/android/widget/Switch.java @@ -57,7 +57,7 @@ import com.android.internal.R; * {@link #setTextAppearance(android.content.Context, int) textAppearance} and the related * setTypeface() methods control the typeface and style of label text, whereas the * {@link #setSwitchTextAppearance(android.content.Context, int) switchTextAppearance} and - * the related seSwitchTypeface() methods control that of the thumb. + * the related setSwitchTypeface() methods control that of the thumb. * *

See the Toggle Buttons * guide.

-- cgit v1.1