From 41ec65355bd6ded652769725b276d47c54a0d913 Mon Sep 17 00:00:00 2001 From: Scott Main Date: Thu, 19 Aug 2010 16:57:07 -0700 Subject: [PATCH] docs: add links from widget classes to tutorials Change-Id: I817e885524951853182b0458df4a32dea1614243 --- core/java/android/app/DatePickerDialog.java | 3 +++ core/java/android/app/TimePickerDialog.java | 3 +++ core/java/android/webkit/WebView.java | 3 +++ .../android/widget/AutoCompleteTextView.java | 3 +++ core/java/android/widget/Button.java | 3 +++ core/java/android/widget/CheckBox.java | 3 +++ core/java/android/widget/DatePicker.java | 3 +++ core/java/android/widget/EditText.java | 3 +++ core/java/android/widget/Gallery.java | 3 +++ core/java/android/widget/GridView.java | 3 +++ core/java/android/widget/ImageButton.java | 3 +++ core/java/android/widget/LinearLayout.java | 3 +++ core/java/android/widget/ListView.java | 3 +++ core/java/android/widget/RadioButton.java | 3 +++ core/java/android/widget/RatingBar.java | 3 +++ core/java/android/widget/RelativeLayout.java | 3 +++ core/java/android/widget/Spinner.java | 3 +++ core/java/android/widget/TabHost.java | 3 +++ core/java/android/widget/TabWidget.java | 3 +++ core/java/android/widget/TableLayout.java | 3 +++ core/java/android/widget/TimePicker.java | 3 +++ core/java/android/widget/ToggleButton.java | 3 +++ .../tutorials/views/hello-formstuff.jd | 26 ++++++++++++++----- 23 files changed, 86 insertions(+), 6 deletions(-) diff --git a/core/java/android/app/DatePickerDialog.java b/core/java/android/app/DatePickerDialog.java index 78bbb4f42c19a..009671f3e4e9a 100644 --- a/core/java/android/app/DatePickerDialog.java +++ b/core/java/android/app/DatePickerDialog.java @@ -35,6 +35,9 @@ import java.util.Calendar; /** * A simple dialog containing an {@link android.widget.DatePicker}. + * + *

See the Date Picker + * tutorial.

*/ public class DatePickerDialog extends AlertDialog implements OnClickListener, OnDateChangedListener { diff --git a/core/java/android/app/TimePickerDialog.java b/core/java/android/app/TimePickerDialog.java index 002b01f69eec3..62d3f7df314fd 100644 --- a/core/java/android/app/TimePickerDialog.java +++ b/core/java/android/app/TimePickerDialog.java @@ -32,6 +32,9 @@ import java.util.Calendar; /** * A dialog that prompts the user for the time of day using a {@link TimePicker}. + * + *

See the Time Picker + * tutorial.

*/ public class TimePickerDialog extends AlertDialog implements OnClickListener, OnTimeChangedListener { diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 2df250d0ba48f..bbd8b95c7bea6 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -117,6 +117,9 @@ import junit.framework.Assert; * href="{@docRoot}guide/topics/manifest/manifest-element.html">{@code <manifest>} * element.

* + *

See the Web View + * tutorial.

+ * *

Basic usage

* *

By default, a WebView provides no browser-like widgets, does not diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index e15a520ae064a..39714872dc7a9 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -76,6 +76,9 @@ import com.android.internal.R; * } * * + *

See the Auto Complete + * tutorial.

+ * * @attr ref android.R.styleable#AutoCompleteTextView_completionHint * @attr ref android.R.styleable#AutoCompleteTextView_completionThreshold * @attr ref android.R.styleable#AutoCompleteTextView_completionHintView diff --git a/core/java/android/widget/Button.java b/core/java/android/widget/Button.java index 5e692d4fbbe15..176233e68735b 100644 --- a/core/java/android/widget/Button.java +++ b/core/java/android/widget/Button.java @@ -48,6 +48,9 @@ import android.widget.RemoteViews.RemoteView; * } * * + *

See the Form Stuff + * tutorial.

+ * *

XML attributes

*

* See {@link android.R.styleable#Button Button Attributes}, diff --git a/core/java/android/widget/CheckBox.java b/core/java/android/widget/CheckBox.java index ff63a249d7691..b89c2a933f56d 100644 --- a/core/java/android/widget/CheckBox.java +++ b/core/java/android/widget/CheckBox.java @@ -41,6 +41,9 @@ import android.util.AttributeSet; * } * } * + * + *

See the Form Stuff + * tutorial.

* *

XML attributes

*

diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java index b3d5f1af58a74..a4ee68af791d8 100644 --- a/core/java/android/widget/DatePicker.java +++ b/core/java/android/widget/DatePicker.java @@ -37,6 +37,9 @@ import java.util.Calendar; /** * A view for selecting a month / year / day based on a calendar like layout. * + *

See the Date Picker + * tutorial.

+ * * For a dialog using this view, see {@link android.app.DatePickerDialog}. */ @Widget diff --git a/core/java/android/widget/EditText.java b/core/java/android/widget/EditText.java index 1532db1942626..0da68a453e7cf 100644 --- a/core/java/android/widget/EditText.java +++ b/core/java/android/widget/EditText.java @@ -35,6 +35,9 @@ import android.util.AttributeSet; /** * EditText is a thin veneer over TextView that configures itself * to be editable. + * + *

See the Form Stuff + * tutorial.

*

* XML attributes *

diff --git a/core/java/android/widget/Gallery.java b/core/java/android/widget/Gallery.java index f34823cb484a3..aea804291c0c4 100644 --- a/core/java/android/widget/Gallery.java +++ b/core/java/android/widget/Gallery.java @@ -46,6 +46,9 @@ import android.view.animation.Transformation; *

* Views given to the Gallery should use {@link Gallery.LayoutParams} as their * layout parameters type. + * + *

See the Gallery + * tutorial.

* * @attr ref android.R.styleable#Gallery_animationDuration * @attr ref android.R.styleable#Gallery_spacing diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java index d2829db0de185..2f86d756b07aa 100644 --- a/core/java/android/widget/GridView.java +++ b/core/java/android/widget/GridView.java @@ -31,6 +31,9 @@ import android.view.animation.GridLayoutAnimationController; /** * A view that shows items in two-dimensional scrolling grid. The items in the * grid come from the {@link ListAdapter} associated with this view. + * + *

See the Grid + * View tutorial.

*/ public class GridView extends AbsListView { public static final int NO_STRETCH = 0; diff --git a/core/java/android/widget/ImageButton.java b/core/java/android/widget/ImageButton.java index 5c05170221531..12a68db8af1e8 100644 --- a/core/java/android/widget/ImageButton.java +++ b/core/java/android/widget/ImageButton.java @@ -62,6 +62,9 @@ import java.util.Map; * it will only be applied after {@code android:state_pressed} and {@code * android:state_focused} have both evaluated false.

* + *

See the Form Stuff + * tutorial.

+ * *

XML attributes

*

* See {@link android.R.styleable#ImageView Button Attributes}, diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java index bd07e1f54ffae..3d7940c7ef7c9 100644 --- a/core/java/android/widget/LinearLayout.java +++ b/core/java/android/widget/LinearLayout.java @@ -37,6 +37,9 @@ import android.widget.RemoteViews.RemoteView; * {@link android.widget.LinearLayout.LayoutParams LinearLayout.LayoutParams}. * The default orientation is horizontal. * + *

See the Linear Layout + * tutorial.

+ * *

* Also see {@link LinearLayout.LayoutParams android.widget.LinearLayout.LayoutParams} * for layout attributes

diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java index 892c44af7ffc4..3015406fd5f61 100644 --- a/core/java/android/widget/ListView.java +++ b/core/java/android/widget/ListView.java @@ -58,6 +58,9 @@ import java.util.ArrayList; * A view that shows items in a vertically scrolling list. The items * come from the {@link ListAdapter} associated with this view. * + *

See the List View + * tutorial.

+ * * @attr ref android.R.styleable#ListView_entries * @attr ref android.R.styleable#ListView_divider * @attr ref android.R.styleable#ListView_dividerHeight diff --git a/core/java/android/widget/RadioButton.java b/core/java/android/widget/RadioButton.java index 14ec8c6da68c9..ebbe1cd17649a 100644 --- a/core/java/android/widget/RadioButton.java +++ b/core/java/android/widget/RadioButton.java @@ -34,6 +34,9 @@ import android.util.AttributeSet; * a radio group, checking one radio button unchecks all the others.

*

* + *

See the Form Stuff + * tutorial.

+ * *

XML attributes

*

* See {@link android.R.styleable#CompoundButton CompoundButton Attributes}, diff --git a/core/java/android/widget/RatingBar.java b/core/java/android/widget/RatingBar.java index 1800c5a01b9a8..28499d0624800 100644 --- a/core/java/android/widget/RatingBar.java +++ b/core/java/android/widget/RatingBar.java @@ -41,6 +41,9 @@ import com.android.internal.R; *

* The secondary progress should not be modified by the client as it is used * internally as the background for a fractionally filled star. + * + *

See the Form Stuff + * tutorial.

* * @attr ref android.R.styleable#RatingBar_numStars * @attr ref android.R.styleable#RatingBar_rating diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java index 1aa1df30afa09..1630e7f102bd7 100644 --- a/core/java/android/widget/RelativeLayout.java +++ b/core/java/android/widget/RelativeLayout.java @@ -54,6 +54,9 @@ import java.util.ArrayList; * {@link #ALIGN_PARENT_BOTTOM}. *

* + *

See the Relative + * Layout tutorial.

+ * *

* Also see {@link android.widget.RelativeLayout.LayoutParams RelativeLayout.LayoutParams} for * layout attributes diff --git a/core/java/android/widget/Spinner.java b/core/java/android/widget/Spinner.java index 2f6dd1e853e4e..8ddb06c9b4ac2 100644 --- a/core/java/android/widget/Spinner.java +++ b/core/java/android/widget/Spinner.java @@ -32,6 +32,9 @@ import android.view.ViewGroup; * A view that displays one child at a time and lets the user pick among them. * The items in the Spinner come from the {@link Adapter} associated with * this view. + * + *

See the Spinner + * tutorial.

* * @attr ref android.R.styleable#Spinner_prompt */ diff --git a/core/java/android/widget/TabHost.java b/core/java/android/widget/TabHost.java index 02cd6a81ebfda..f720ceed296b6 100644 --- a/core/java/android/widget/TabHost.java +++ b/core/java/android/widget/TabHost.java @@ -40,6 +40,9 @@ import java.util.List; * user clicks to select a specific tab, and a FrameLayout object that displays the contents of that * page. The individual elements are typically controlled using this container object, rather than * setting values on the child elements themselves. + * + *

See the Tab Layout + * tutorial.

*/ public class TabHost extends FrameLayout implements ViewTreeObserver.OnTouchModeChangeListener { diff --git a/core/java/android/widget/TabWidget.java b/core/java/android/widget/TabWidget.java index 4e1b5856e156c..afae7eff64990 100644 --- a/core/java/android/widget/TabWidget.java +++ b/core/java/android/widget/TabWidget.java @@ -40,6 +40,9 @@ import android.view.View.OnFocusChangeListener; * handler, and manage callbacks. You might call this object to iterate the list * of tabs, or to tweak the layout of the tab list, but most methods should be * called on the containing TabHost object. + * + *

See the Tab Layout + * tutorial.

* * @attr ref android.R.styleable#TabWidget_divider * @attr ref android.R.styleable#TabWidget_tabStripEnabled diff --git a/core/java/android/widget/TableLayout.java b/core/java/android/widget/TableLayout.java index 73760acdb2534..7f26e28b07709 100644 --- a/core/java/android/widget/TableLayout.java +++ b/core/java/android/widget/TableLayout.java @@ -67,6 +67,9 @@ import java.util.regex.Pattern; *

Although the typical child of a TableLayout is a TableRow, you can * actually use any View subclass as a direct child of TableLayout. The View * will be displayed as a single row that spans all the table columns.

+ * + *

See the Table + * Layout tutorial.

*/ public class TableLayout extends LinearLayout { private int[] mMaxWidths; diff --git a/core/java/android/widget/TimePicker.java b/core/java/android/widget/TimePicker.java index caed308a2be7e..e61fac39b54af 100644 --- a/core/java/android/widget/TimePicker.java +++ b/core/java/android/widget/TimePicker.java @@ -45,6 +45,9 @@ import java.util.Calendar; * Under AM/PM mode, the user can hit 'a', 'A", 'p' or 'P' to pick. * * For a dialog using this view, see {@link android.app.TimePickerDialog}. + * + *

See the Time Picker + * tutorial.

*/ @Widget public class TimePicker extends FrameLayout { diff --git a/core/java/android/widget/ToggleButton.java b/core/java/android/widget/ToggleButton.java index dc791e3b5ef5f..3b680e8887efc 100644 --- a/core/java/android/widget/ToggleButton.java +++ b/core/java/android/widget/ToggleButton.java @@ -26,6 +26,9 @@ import android.util.AttributeSet; /** * Displays checked/unchecked states as a button * with a "light" indicator and by default accompanied with the text "ON" or "OFF". + * + *

See the Form Stuff + * tutorial.

* * @attr ref android.R.styleable#ToggleButton_textOn * @attr ref android.R.styleable#ToggleButton_textOff diff --git a/docs/html/resources/tutorials/views/hello-formstuff.jd b/docs/html/resources/tutorials/views/hello-formstuff.jd index 3dd5f21a62652..b9f6c16dd7499 100644 --- a/docs/html/resources/tutorials/views/hello-formstuff.jd +++ b/docs/html/resources/tutorials/views/hello-formstuff.jd @@ -32,9 +32,19 @@ public void onCreate(Bundle savedInstanceState) { } +

Now select which kind of form widget you'd like to create:

+ -

Custom Button

+ +

Custom Button

In this section, you will create a button with a custom image instead of text, using the {@link android.widget.Button} widget and an XML file that defines three different images to use for the @@ -111,7 +121,8 @@ defines the action to be made when the button is clicked. In this example, a -

EditText

+ +

Edit Text

In this section, you will create a text field for user input, using the {@link android.widget.EditText} widget. Once text has been entered into the field, the "Enter" key will @@ -158,7 +169,8 @@ result in a carriage return in the text field).

-

CheckBox

+ +

Checkbox

In this section, you will create a checkbox for selecting items, using the {@link android.widget.CheckBox} widget. When the checkbox is pressed, a toast message will @@ -209,7 +221,8 @@ use the {@link android.widget.CompoundButton#setChecked(boolean)} or {@link android.widget.CompoundButton#toggle()} method.

-

RadioButton

+ +

Radio Buttons

In this section, you will create two mutually-exclusive radio buttons (enabling one disables the other), using the {@link android.widget.RadioGroup} and {@link android.widget.RadioButton} @@ -274,7 +287,8 @@ use the {@link android.widget.CompoundButton#setChecked(boolean)} or {@link android.widget.CompoundButton#toggle()} method.

-

ToggleButton

+ +

Toggle Button

In this section, you'll create a button used specifically for toggling between two states, using the {@link android.widget.ToggleButton} widget. This widget is an excellent @@ -330,7 +344,7 @@ android.widget.CompoundButton#toggle()} method.

-

RatingBar

+

Rating Bar

In this section, you'll create a widget that allows the user to provide a rating, with the {@link android.widget.RatingBar} widget.