Skip to content

Commit

Permalink
[Docs] Crosslink github docs in javadocs
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 546393704
  • Loading branch information
imhappi authored and paulfthomas committed Jul 11, 2023
1 parent 7c40359 commit e3b255b
Show file tree
Hide file tree
Showing 44 changed files with 240 additions and 15 deletions.
6 changes: 4 additions & 2 deletions lib/java/com/google/android/material/appbar/AppBarLayout.java
Expand Up @@ -136,8 +136,10 @@
* </androidx.coordinatorlayout.widget.CoordinatorLayout>
* </pre>
*
* @see <a href="https://material.io/components/app-bars-top#anatomy">
* https://material.io/components/app-bars-top#anatomy</a>
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/TopAppBar.md">component
* developer guidance</a> and <a href="https://material.io/components/top-app-bar/overview">design
* guidelines</a>.
*/
public class AppBarLayout extends LinearLayout implements CoordinatorLayout.AttachedBehavior {

Expand Down
Expand Up @@ -109,13 +109,22 @@
* view' to the Toolbar which allows us to work out the available space for the title. This can
* interfere with any views which you add.
*
* @attr ref com.google.android.material.R.styleable#CollapsingToolbarLayout_collapsedTitleTextAppearance
* @attr ref com.google.android.material.R.styleable#CollapsingToolbarLayout_expandedTitleTextAppearance
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/TopAppBar.md">component
* developer guidance</a> and <a href="https://material.io/components/top-app-bar/overview">design
* guidelines</a>.
*
* @attr ref
* com.google.android.material.R.styleable#CollapsingToolbarLayout_collapsedTitleTextAppearance
* @attr ref
* com.google.android.material.R.styleable#CollapsingToolbarLayout_expandedTitleTextAppearance
* @attr ref com.google.android.material.R.styleable#CollapsingToolbarLayout_contentScrim
* @attr ref com.google.android.material.R.styleable#CollapsingToolbarLayout_expandedTitleMargin
* @attr ref com.google.android.material.R.styleable#CollapsingToolbarLayout_expandedTitleMarginStart
* @attr ref
* com.google.android.material.R.styleable#CollapsingToolbarLayout_expandedTitleMarginStart
* @attr ref com.google.android.material.R.styleable#CollapsingToolbarLayout_expandedTitleMarginEnd
* @attr ref com.google.android.material.R.styleable#CollapsingToolbarLayout_expandedTitleMarginBottom
* @attr ref
* com.google.android.material.R.styleable#CollapsingToolbarLayout_expandedTitleMarginBottom
* @attr ref com.google.android.material.R.styleable#CollapsingToolbarLayout_statusBarScrim
* @attr ref com.google.android.material.R.styleable#CollapsingToolbarLayout_toolbarId
*/
Expand Down
5 changes: 5 additions & 0 deletions lib/java/com/google/android/material/badge/BadgeDrawable.java
Expand Up @@ -123,6 +123,11 @@
*
* <p>Note: This is still under development and may not support the full range of customization
* Material Android components generally support (e.g. themed attributes).
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/BadgeDrawable.md">component
* developer guidance</a> and <a href="https://material.io/components/badges/overview">design
* guidelines</a>.
*/
public class BadgeDrawable extends Drawable implements TextDrawableDelegate {

Expand Down
Expand Up @@ -107,6 +107,11 @@
* colorSurface}, as it is in the default style, you should set {@code materialThemeOverlay} to
* {@code @style/ThemeOverlay.MaterialComponents.BottomAppBar.Surface}.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/BottomAppBar.md">component
* developer guidance</a> and <a
* href="https://material.io/components/bottom-app-bar/overview">design guidelines</a>.
*
* @attr ref com.google.android.material.R.styleable#BottomAppBar_backgroundTint
* @attr ref com.google.android.material.R.styleable#BottomAppBar_fabAlignmentMode
* @attr ref com.google.android.material.R.styleable#BottomAppBar_fabAnchorMode
Expand Down
Expand Up @@ -86,6 +86,11 @@
* android:icon="@drawable/ic_action_navigation_menu" /&gt;
* &lt;/menu&gt;
* </pre>
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md">component
* developer guidance</a> and <a
* href="https://material.io/components/navigation-bar/overview">design guidelines</a>.
*/
public class BottomNavigationView extends NavigationBarView {
private static final int MAX_ITEM_COUNT = 5;
Expand Down
Expand Up @@ -91,6 +91,11 @@
* <p>To send useful accessibility events, set a title on bottom sheets that are windows or are
* window-like. For BottomSheetDialog use {@link BottomSheetDialog#setTitle(int)}, and for
* BottomSheetDialogFragment use {@link ViewCompat#setAccessibilityPaneTitle(View, CharSequence)}.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/BottomSheet.md">component
* developer guidance</a> and <a
* href="https://material.io/components/bottom-sheets/overview">design guidelines</a>.
*/
public class BottomSheetBehavior<V extends View> extends CoordinatorLayout.Behavior<V>
implements MaterialBackHandler {
Expand Down
Expand Up @@ -65,6 +65,11 @@
* status bar. Padding can be applied automatically to the left, right, or bottom if any of
* `paddingBottomSystemWindowInsets`, `paddingLeftSystemWindowInsets`, or
* `paddingRightSystemWindowInsets` are set to true in the style.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/BottomSheet.md">component
* developer guidance</a> and <a
* href="https://material.io/components/bottom-sheets/overview">design guidelines</a>.
*/
public class BottomSheetDialog extends AppCompatDialog {

Expand Down
Expand Up @@ -28,6 +28,11 @@
/**
* Modal bottom sheet. This is a version of {@link androidx.fragment.app.DialogFragment} that shows
* a bottom sheet using {@link BottomSheetDialog} instead of a floating dialog.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/BottomSheet.md">component
* developer guidance</a> and <a
* href="https://material.io/components/bottom-sheets/overview">design guidelines</a>.
*/
public class BottomSheetDialogFragment extends AppCompatDialogFragment {

Expand Down
Expand Up @@ -112,6 +112,11 @@
*
* <p>Specify the radius of all four corners of the button using the {@code app:cornerRadius}
* attribute.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Button.md">component
* developer guidance</a> and <a href="https://material.io/components/buttons/overview">design
* guidelines</a>.
*/
public class MaterialButton extends AppCompatButton implements Checkable, Shapeable {

Expand Down
Expand Up @@ -123,6 +123,11 @@
* shapeAppearanceOverlay}, or {@code cornerRadius} attribute set on MaterialButton children such
* that only the left-most corners of the first child and the right-most corners of the last child
* retain their shape appearance or corner size.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Button.md">component
* developer guidance</a> and <a href="https://material.io/components/buttons/overview">design
* guidelines</a>.
*/
public class MaterialButtonToggleGroup extends LinearLayout {

Expand Down
Expand Up @@ -76,6 +76,11 @@
* to getParent() on children of the MaterialCardView, will not return the MaterialCardView itself,
* but rather an intermediate View. If you need to access a MaterialCardView directly, set an {@code
* android:id} and use {@link View#findViewById(int)}.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Card.md">component
* developer guidance</a> and <a href="https://material.io/components/cards/overview">design
* guidelines</a>.
*/
public class MaterialCardView extends CardView implements Checkable, Shapeable {

Expand Down
Expand Up @@ -66,6 +66,11 @@
* <p>Note that when Carousel measures and lays out items, the first item in the adapter will be
* measured and it's desired size will be used to determine an appropriate size for all items in the
* carousel.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Carousel.md">component
* developer guidance</a> and <a href="https://material.io/components/carousel/overview">design
* guidelines</a>.
*/
public class CarouselLayoutManager extends LayoutManager
implements Carousel, RecyclerView.SmoothScroller.ScrollVectorProvider {
Expand Down
Expand Up @@ -32,6 +32,11 @@
*
* <p>This class will automatically be reversed by {@link CarouselLayoutManager} if being laid out
* right-to-left and does not need to make any account for layout direction itself.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Carousel.md">component
* developer guidance</a> and <a href="https://material.io/components/carousel/overview">design
* guidelines</a>.
*/
public class FullScreenCarouselStrategy extends CarouselStrategy {

Expand Down
Expand Up @@ -39,6 +39,11 @@
*
* <p>This class will automatically be reversed by {@link CarouselLayoutManager} if being laid out
* right-to-left and does not need to make any account for layout direction itself.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Carousel.md">component
* developer guidance</a> and <a href="https://material.io/components/carousel/overview">design
* guidelines</a>.
*/
public class HeroCarouselStrategy extends CarouselStrategy {

Expand Down
Expand Up @@ -44,6 +44,11 @@
*
* <p>This class will automatically be reversed by {@link CarouselLayoutManager} if being laid out
* right-to-left and does not need to make any account for layout direction itself.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Carousel.md">component
* developer guidance</a> and <a href="https://material.io/components/carousel/overview">design
* guidelines</a>.
*/
public final class MultiBrowseCarouselStrategy extends CarouselStrategy {

Expand Down
Expand Up @@ -77,6 +77,11 @@
* <p>If setting a custom {@code app:buttonCompat}, make sure to also set {@code app:buttonIcon} if
* an icon is desired. The checkbox does not support having a custom {@code app:buttonCompat} and
* preserving the default {@code app:buttonIcon} checkmark at the same time.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Checkbox.md">component
* developer guidance</a> and <a href="https://material.io/components/checkbox/overview">design
* guidelines</a>.
*/
public class MaterialCheckBox extends AppCompatCheckBox {

Expand Down
5 changes: 5 additions & 0 deletions lib/java/com/google/android/material/chip/Chip.java
Expand Up @@ -126,6 +126,11 @@
* after the layout has been invalidated so you need to ensure that initial rendering has the
* correct layout.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Chip.md">component
* developer guidance</a> and <a href="https://material.io/components/chips/overview">design
* guidelines</a>.
*
* @see ChipDrawable
*/
public class Chip extends AppCompatCheckBox
Expand Down
5 changes: 5 additions & 0 deletions lib/java/com/google/android/material/chip/ChipDrawable.java
Expand Up @@ -157,6 +157,11 @@
* closeIcon}. chipIcon and checkedIcon inherit the state of this drawable, but closeIcon contains
* its own state that you can set with {@link #setCloseIconState(int[])}.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Chip.md">component
* developer guidance</a> and <a href="https://material.io/components/chips/overview">design
* guidelines</a>.
*
* @see Chip
*/
public class ChipDrawable extends MaterialShapeDrawable
Expand Down
5 changes: 5 additions & 0 deletions lib/java/com/google/android/material/chip/ChipGroup.java
Expand Up @@ -56,6 +56,11 @@
* <p>When a chip is added to a chip group, its checked state will be preserved. If the chip group
* is in the single selection mode and there is an existing checked chip when another checked chip
* is added, the existing checked chip will be unchecked to maintain the single selection rule.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Chip.md">component
* developer guidance</a> and <a href="https://material.io/components/chips/overview">design
* guidelines</a>.
*/
public class ChipGroup extends FlowLayout {

Expand Down
Expand Up @@ -66,7 +66,14 @@
import java.text.SimpleDateFormat;
import java.util.LinkedHashSet;

/** A {@link Dialog} with a header, {@link MaterialCalendar}, and set of actions. */
/**
* A {@link Dialog} with a header, {@link MaterialCalendar}, and set of actions.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/DatePicker.md">component
* developer guidance</a> and <a href="https://material.io/components/date-pickers/overview">design
* guidelines</a>.
*/
public final class MaterialDatePicker<S> extends DialogFragment {

private static final String OVERRIDE_THEME_RES_ID = "OVERRIDE_THEME_RES_ID";
Expand Down
Expand Up @@ -64,6 +64,11 @@
*
* <p>The type of dialog returned is still an {@link AlertDialog}; there is no specific Material
* implementation of {@link AlertDialog}.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Dialog.md">component
* developer guidance</a> and <a href="https://material.io/components/dialogs/overview">design
* guidelines</a>.
*/
public class MaterialAlertDialogBuilder extends AlertDialog.Builder {

Expand Down
Expand Up @@ -44,6 +44,11 @@
* <p>The divider will display the correct default Material colors without the use of a style flag
* in a layout file. Make sure to set {@code android:layout_height="wrap_content"} to ensure that
* the correct thickness is set for the divider.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Divider.md">component
* developer guidance</a> and <a href="https://material.io/components/divider/overview">design
* guidelines</a>.
*/
public class MaterialDivider extends View {

Expand Down
Expand Up @@ -53,6 +53,11 @@
* layoutManager.getOrientation());
* recyclerView.addItemDecoration(dividerItemDecoration);
* </pre>
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Divider.md">component
* developer guidance</a> and <a href="https://material.io/components/divider/overview">design
* guidelines</a>.
*/
public class MaterialDividerItemDecoration extends ItemDecoration {
public static final int HORIZONTAL = LinearLayout.HORIZONTAL;
Expand Down
Expand Up @@ -75,8 +75,13 @@
* #setText(CharSequence)}.
*
* <p>The background color of this view defaults to the your theme's {@code colorSecondary}. If you
* wish to change this at runtime then you can do so via
* {@link #setBackgroundTintList(android.content.res.ColorStateList)}.
* wish to change this at runtime then you can do so via {@link
* #setBackgroundTintList(android.content.res.ColorStateList)}.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/FloatingActionButton.md">component
* developer guidance</a> and <a href="https://material.io/components/extended-fab/overview">design
* guidelines</a>.
*/
public class ExtendedFloatingActionButton extends MaterialButton implements AttachedBehavior {

Expand Down
Expand Up @@ -97,6 +97,11 @@
* <p>The background color of this view defaults to the your theme's {@code colorSecondary}. If you
* wish to change this at runtime then you can do so via {@link
* #setBackgroundTintList(ColorStateList)}.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/FloatingActionButton.md">component
* developer guidance</a> and <a
* href="https://material.io/components/floating-action-button/overview">design guidelines</a>.
*/
public class FloatingActionButton extends VisibilityAwareImageButton
implements TintableBackgroundView,
Expand Down
Expand Up @@ -47,6 +47,11 @@
* A class that creates a Material Themed Switch. This class is intended to provide a brand new
* Switch design and replace the obsolete
* {@link com.google.android.material.switchmaterial.SwitchMaterial} class.
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/Switch.md">component
* developer guidance</a> and <a href="https://material.io/components/switch/overview">design
* guidelines</a>.
*/
public class MaterialSwitch extends SwitchCompat {
private static final int DEF_STYLE_RES = R.style.Widget_Material3_CompoundButton_MaterialSwitch;
Expand Down
Expand Up @@ -118,6 +118,11 @@
* app:menu="@menu/my_navigation_items" /&gt;
* &lt;/androidx.drawerlayout.widget.DrawerLayout&gt;
* </pre>
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/NavigationDrawer.md">component
* developer guidance</a> and <a
* href="https://material.io/components/navigation-drawer/overview">design guidelines</a>.
*/
public class NavigationView extends ScrimInsetsFrameLayout implements MaterialBackHandler {

Expand Down
Expand Up @@ -96,6 +96,11 @@
* android:contentDescription="@string/my_navigation_rail_fab_content_desc"
* app:srcCompat="@drawable/ic_add" /&gt;
* </pre>
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/NavigationRail.md">component
* developer guidance</a> and <a
* href="https://material.io/components/navigation-rail/overview">design guidelines</a>.
*/
public class NavigationRailView extends NavigationBarView {

Expand Down
Expand Up @@ -49,6 +49,11 @@
* <li>{@code indicatorInset}: the inset from component's bound to the spinner's outer edge.
* <li>{@code indicatorDirectionCircular}: the rotation direction of the spinner or indicator.
* </ul>
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/ProgressIndicator.md">component
* developer guidance</a> and <a
* href="https://material.io/components/progress-indicators/overview">design guidelines</a>.
*/
public final class CircularProgressIndicator
extends BaseProgressIndicator<CircularProgressIndicatorSpec> {
Expand Down
Expand Up @@ -48,6 +48,11 @@
* <li>{@code indeterminateAnimationType}: the type of indeterminate animation.
* <li>{@code indicatorDirectionLinear}: the sweeping direction of the indicator.
* </ul>
*
* <p>For more information, see the <a
* href="https://github.com/material-components/material-components-android/blob/master/docs/components/ProgressIndicator.md">component
* developer guidance</a> and <a
* href="https://material.io/components/progress-indicators/overview">design guidelines</a>.
*/