From 3404032dfc3ef9130806de62289da27b3de0be46 Mon Sep 17 00:00:00 2001 From: Mark Lu Date: Tue, 30 Aug 2016 18:12:30 -0700 Subject: [PATCH] docs: Mention SwitchCompat in Switch and toggle documentation Bug: 19574556 Change-Id: I2ebb504b144a442d90cfdf6ab4b407726a3b896f --- core/java/android/widget/Switch.java | 3 +++ docs/html/guide/topics/ui/controls/togglebutton.jd | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core/java/android/widget/Switch.java b/core/java/android/widget/Switch.java index c4a17715896c1..a01d65a1df202 100644 --- a/core/java/android/widget/Switch.java +++ b/core/java/android/widget/Switch.java @@ -65,6 +65,9 @@ import com.android.internal.R; * {@link #setSwitchTextAppearance(android.content.Context, int) switchTextAppearance} and * the related setSwitchTypeface() methods control that of the thumb. * + *

{@link android.support.v7.widget.SwitchCompat} is a version of + * the Switch widget which runs on devices back to API 7.

+ * *

See the Toggle Buttons * guide.

* diff --git a/docs/html/guide/topics/ui/controls/togglebutton.jd b/docs/html/guide/topics/ui/controls/togglebutton.jd index e0549ecb28f43..181647c218495 100644 --- a/docs/html/guide/topics/ui/controls/togglebutton.jd +++ b/docs/html/guide/topics/ui/controls/togglebutton.jd @@ -14,6 +14,7 @@ page.tags=switch,togglebutton
  1. {@link android.widget.ToggleButton}
  2. {@link android.widget.Switch}
  3. +
  4. {@link android.support.v7.widget.SwitchCompat}
  5. {@link android.widget.CompoundButton}
@@ -21,9 +22,12 @@ page.tags=switch,togglebutton

A toggle button allows the user to change a setting between two states.

-

You can add a basic toggle button to your layout with the {@link android.widget.ToggleButton} -object. Android 4.0 (API level 14) introduces another kind of toggle button called a switch that -provides a slider control, which you can add with a {@link android.widget.Switch} object.

+

You can add a basic toggle button to your layout with the +{@link android.widget.ToggleButton} object. Android 4.0 (API level 14) +introduces another kind of toggle button called a switch that provides a slider +control, which you can add with a {@link android.widget.Switch} object. +{@link android.support.v7.widget.SwitchCompat} is a version of the Switch +widget which runs on devices back to API 7.

If you need to change a button's state yourself, you can use the {@link