Skip to content

Commit

Permalink
Update links in material component docs
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 195898245
  • Loading branch information
cketcham authored and dsn5ft committed May 9, 2018
1 parent c7e01de commit 73d1c6f
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 59 deletions.
19 changes: 10 additions & 9 deletions docs/components/AppBarLayout.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ responsiveness to scrolling.

## Design & API Documentation

* [Material Design guidelines: Top App Bar](https://material.io/go/design-app-bar-top)
* [Material Design guidelines: Top App
Bar](https://material.io/go/design-app-bar-top)
<!--{: .icon-list-item.icon-list-item--spec }-->
* [Material Design guidelines: Scrolling
techniques](https://material.io/go/design-app-bar-top#behavior)
Expand All @@ -28,11 +29,11 @@ responsiveness to scrolling.
<!--{: .icon-list-item.icon-list-item--link }-->
<!-- Styles for list items requiring icons instead of standard bullets. -->
* [Class
overview](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.html)
overview](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

As a container for Toolbars, and other views, it works with
[CoordinatorLayout](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.html)
[CoordinatorLayout](https://developer.android.com/reference/androidx/coordinatorlayout/widget/CoordinatorLayout)
in order to respond to scrolling techniques. `AppBarLayout` depends heavily on
being used as a direct child of the CoordinatorLayout and reacts to a sibling
that supports scrolling (e.g.
Expand All @@ -44,12 +45,12 @@ respond to scrolling. These are interpreted by the `AppBarLayout.LayoutParams`.

**Available flags are:**

* [enterAlways](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams.html#SCROLL_FLAG_ENTER_ALWAYS)
* [enterAlwaysCollapsed](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams.html#SCROLL_FLAG_ENTER_ALWAYS_COLLAPSED)
* [exitUntilCollapsed](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams.html#SCROLL_FLAG_EXIT_UNTIL_COLLAPSED)
* [scroll](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams.html#SCROLL_FLAG_SCROLL)
* [snap](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams.html#SCROLL_FLAG_SNAP)
* [snapMargins](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams.html#SCROLL_FLAG_SNAP_MARGINS)
* [enterAlways](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams#SCROLL_FLAG_ENTER_ALWAYS)
* [enterAlwaysCollapsed](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams#SCROLL_FLAG_ENTER_ALWAYS_COLLAPSED)
* [exitUntilCollapsed](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams#SCROLL_FLAG_EXIT_UNTIL_COLLAPSED)
* [scroll](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams#SCROLL_FLAG_SCROLL)
* [snap](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams#SCROLL_FLAG_SNAP)
* [snapMargins](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams#SCROLL_FLAG_SNAP_MARGINS)

Views using the scroll flag should be declared and visually positioned before
other views in the `AppBarLayout`. This ensures that they are able to exit at the
Expand Down
3 changes: 3 additions & 0 deletions docs/components/BottomAppBar.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ focus on features, increases engagement, and visually anchors the UI.
- [Class
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/bottomappbar/BottomAppBar.java)
<!--{: .icon-list-item.icon-list-item--link }-->
- [Class
overview](https://developer.android.com/reference/com/google/android/material/bottomappbar/BottomAppBar)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

## Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/components/BottomNavigationView.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ navigate to.
<!--{: .icon-list-item.icon-list-item--link }-->
<!-- Styles for list items requiring icons instead of standard bullets. -->
- [Class
overview](https://developer.android.com/reference/com/google/android/material/bottomnavigation/BottomNavigationView.html)
overview](https://developer.android.com/reference/com/google/android/material/bottomnavigation/BottomNavigationView)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

## Usage
Expand Down
4 changes: 2 additions & 2 deletions docs/components/BottomSheetBehavior.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ path: /catalog/bottom-sheet-behavior/
<!--{: .article__asset.article__asset--screenshot }-->

`BottomSheetBehavior` is applied to a child of
[CoordinatorLayout](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.html)
[CoordinatorLayout](https://developer.android.com/reference/androidx/coordinatorlayout/widget/CoordinatorLayout)
to make that child a **persistent bottom sheet**.

Persistent bottom sheets are views that come up from the bottom of the
Expand All @@ -32,7 +32,7 @@ Note: If you want to use Bottom Sheets that are modal (dialogs), use
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/bottomsheet/BottomSheetBehavior.java)
<!--{: .icon-list-item.icon-list-item--link }-->
- [Class
overview](https://developer.android.com/reference/com/google/android/material/bottomsheet/BottomSheetBehavior.html)
overview](https://developer.android.com/reference/com/google/android/material/bottomsheet/BottomSheetBehavior)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

## Usage
Expand Down
10 changes: 5 additions & 5 deletions docs/components/BottomSheetDialogFragment.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ vertically and dismissed by completely sliding them down.

Note: To implement non-modal **Persistent bottom sheets** use
[BottomSheetBehavior](BottomSheetBehavior.md) in conjunction with a
[CoordinatorLayout](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.html).
[CoordinatorLayout](https://developer.android.com/reference/androidx/coordinatorlayout/widget/CoordinatorLayout).

## Design & API Documentation

Expand All @@ -32,16 +32,16 @@ Note: To implement non-modal **Persistent bottom sheets** use
<!--{: .icon-list-item.icon-list-item--link }-->
<!-- Styles for list items requiring icons instead of standard bullets. -->
- [Class
overview](https://developer.android.com/reference/com/google/android/material/bottomsheet/BottomSheetDialogFragment.html)
overview](https://developer.android.com/reference/com/google/android/material/bottomsheet/BottomSheetDialogFragment)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

## Usage

1. Subclass `BottomSheetDialogFragment`
2. Override
[`onCreateView`](https://developer.android.com/reference/android/app/Fragment.html#onCreateView\(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle\)).
[`onCreateView`](https://developer.android.com/reference/android/app/Fragment.html#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)).
3. Use one of the two versions of
[`show`](https://developer.android.com/reference/android/support/v4/app/DialogFragment.html#show\(android.support.v4.app.FragmentManager,%20java.lang.String\))
[`show`](https://developer.android.com/reference/android/support/v4/app/DialogFragment.html#show(android.support.v4.app.FragmentManager,%20java.lang.String))
to display the dialog. *Notice `BottomSheetDialogFragment `is a subclass of
AppCompatFragment, which means you need to use
`Activity.getSupportFragmentManager()`.*
Expand All @@ -60,4 +60,4 @@ may feel easier to use on larger devices.
`BottomSheetDialogFragment`s look very similar to the effects of
[BottomSheetBehavior](BottomSheetBehavior.md) but the latter is not modal and
requires a
[CoordinatorLayout](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.html).
[CoordinatorLayout](https://developer.android.com/reference/androidx/coordinatorlayout/widget/CoordinatorLayout).
3 changes: 3 additions & 0 deletions docs/components/Chip.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ of text with a `ChipDrawable` using a span to represent it as a semantic entity.
- [Class
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/chip/Chip.java)
<!--{: .icon-list-item.icon-list-item--link }-->
- [Class
overview](https://developer.android.com/reference/com/google/android/material/chip/Chip)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

## Usage

Expand Down
12 changes: 6 additions & 6 deletions docs/components/CollapsingToolbarLayout.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ path: /catalog/collapsing-toolbar-layout/
characteristics and interactions for **collapsing toolbars** specified in the
material guidelines. To create the collapsing toolbar, `CollapsingToolbarLayout`
integrates with
[`AppBarLayout`](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.html),
[`CoordinatorLayout`](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.html),
[`AppBarLayout`](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout),
[`CoordinatorLayout`](https://developer.android.com/reference/androidx/coordinatorlayout/widget/CoordinatorLayout),
[`Toolbar`](https://developer.android.com/reference/android/support/v7/widget/Toolbar.html),
and a scrollable content view, such as
[`RecyclerView`](https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html).
Expand All @@ -34,7 +34,7 @@ and a scrollable content view, such as
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/appbar/CollapsingToolbarLayout.java)
<!--{: .icon-list-item.icon-list-item--link }-->
* [Class
overview](https://developer.android.com/reference/com/google/android/material/appbar/CollapsingToolbarLayout.html)
overview](https://developer.android.com/reference/com/google/android/material/appbar/CollapsingToolbarLayout)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

## Usage
Expand Down Expand Up @@ -113,7 +113,7 @@ You can combine the basic collapsing toolbar with scroll flags,
would like to achieve your desired toolbar.

* Make sure to call
[`setTitle()`](https://developer.android.com/reference/com/google/android/material/appbar/CollapsingToolbarLayout.html#setTitle\(java.lang.CharSequence\))
[`setTitle()`](https://developer.android.com/reference/com/google/android/material/appbar/CollapsingToolbarLayout#setTitle(java.lang.CharSequence))
on the `CollapsingToolbarLayout` instead of the `Toolbar`. This allows
`CollapsingToolbarLayout` the ability to resize the title based on the
toolbar's current size.
Expand All @@ -128,5 +128,5 @@ would like to achieve your desired toolbar.

## Related Concepts

* [AppBarLayout](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.html)
* [TabLayout](https://developer.android.com/reference/com/google/android/material/tabs/TabLayout.html)
* [AppBarLayout](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout)
* [TabLayout](https://developer.android.com/reference/com/google/android/material/tabs/TabLayout)
4 changes: 2 additions & 2 deletions docs/components/FloatingActionButton.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ other UI elements on the screen.
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/floatingactionbutton/FloatingActionButton.java)
<!--{: .icon-list-item.icon-list-item--link }-->
- [Class
overview](https://developer.android.com/reference/com/google/android/material/floatingactionbutton/FloatingActionButton.html)
overview](https://developer.android.com/reference/com/google/android/material/floatingactionbutton/FloatingActionButton)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

## Usage
Expand Down Expand Up @@ -147,4 +147,4 @@ while the hide animation shrinks the widget and fades it out.

## Related Concepts

- [CoordinatorLayout](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.html)
- [CoordinatorLayout](https://developer.android.com/reference/androidx/coordinatorlayout/widget/CoordinatorLayout)
5 changes: 2 additions & 3 deletions docs/components/MaterialButton.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ different actions. These levels of emphasis include:

## Design & API Documentation

- [Material Design guidelines:
Buttons](https://material.io/go/design-buttons)
- [Material Design guidelines: Buttons](https://material.io/go/design-buttons)
<!--{: .icon-list-item.icon-list-item--spec }-->
- [Class
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/button/MaterialButton.java)
<!--{: .icon-list-item.icon-list-item--link }-->
- [Class
overview](https://developer.android.com/reference/com/google/android/material/button/MaterialButton.html)
overview](https://developer.android.com/reference/com/google/android/material/button/MaterialButton)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

## Usage
Expand Down
4 changes: 2 additions & 2 deletions docs/components/MaterialCardView.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ include functionality for card behavior in groups of cards.
- [Class
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/card/MaterialCardView.java)
<!--{: .icon-list-item.icon-list-item--link }-->
- [Superclass
overview](https://developer.android.com/reference/android/support/v7/widget/CardView.html)
- [Class
overview](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

## Usage
Expand Down
2 changes: 1 addition & 1 deletion docs/components/NavigationView.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ side, used to display in-app navigation links.
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/navigation/NavigationView.java)
<!--{: .icon-list-item.icon-list-item--link }-->
- [Class
overview](https://developer.android.com/reference/com/google/android/material/navigation/NavigationView.html)
overview](https://developer.android.com/reference/com/google/android/material/navigation/NavigationView)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

## Usage
Expand Down
12 changes: 6 additions & 6 deletions docs/components/Snackbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ action that was just taken, or retrying an action that had failed.
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/snackbar/Snackbar.java)
<!--{: .icon-list-item.icon-list-item--link }-->
- [Class
overview](https://developer.android.com/reference/com/google/android/material/snackbar/Snackbar.html)
overview](https://developer.android.com/reference/com/google/android/material/snackbar/Snackbar)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

## Usage
Expand All @@ -45,12 +45,12 @@ could be found.

**Available duration presets are:**

- [LENGTH_INDEFINITE](https://developer.android.com/reference/com/google/android/material/snackbar/Snackbar.html#LENGTH_INDEFINITE)
- [LENGTH_LONG](https://developer.android.com/reference/com/google/android/material/snackbar/Snackbar.html#LENGTH_LONG)
- [LENGTH_SHORT](https://developer.android.com/reference/com/google/android/material/snackbar/Snackbar.html#LENGTH_SHORT)
- [LENGTH_INDEFINITE](https://developer.android.com/reference/com/google/android/material/snackbar/Snackbar#LENGTH_INDEFINITE)
- [LENGTH_LONG](https://developer.android.com/reference/com/google/android/material/snackbar/Snackbar#LENGTH_LONG)
- [LENGTH_SHORT](https://developer.android.com/reference/com/google/android/material/snackbar/Snackbar#LENGTH_SHORT)

**NOTE:** Snackbars work best if they are displayed inside of a
[CoordinatorLayout](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.html).
[CoordinatorLayout](https://developer.android.com/reference/androidx/coordinatorlayout/widget/CoordinatorLayout).
`CoordinatorLayout` allows the snackbar to enable behavior like
swipe-to-dismiss, as well as automatically moving widgets like
[FloatingActionButton](FloatingActionButton.md).
Expand Down Expand Up @@ -99,7 +99,7 @@ Action text color can be customized through the `setActionTextColor` methods

Temporary bottom bars with other sorts of content layouts can be implemented by
subclassing
[BaseTransientBottomBar](https://developer.android.com/reference/com/google/android/material/snackbar/BaseTransientBottomBar.html).
[BaseTransientBottomBar](https://developer.android.com/reference/com/google/android/material/snackbar/BaseTransientBottomBar).

Android also provides a
[Toast](https://developer.android.com/reference/android/widget/Toast.html) class
Expand Down
16 changes: 8 additions & 8 deletions docs/components/TabLayout.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ interactions for a group of tabs including:
- animations,
- and alignment.

The Android Developers site provides [detailed documentation](https://developer.android.com/reference/com/google/android/material/tabs/TabLayout.html)
The Android Developers site provides [detailed
documentation](https://developer.android.com/reference/com/google/android/material/tabs/TabLayout)
on implementing `TabLayout`.

## Design & API Documentation

- [Material Design guidelines:
Tabs](https://material.io/go/design-tabs)
- [Material Design guidelines: Tabs](https://material.io/go/design-tabs)
<!--{: .icon-list-item.icon-list-item--spec }-->
- [Class
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/tabs/TabLayout.java)
<!--{: .icon-list-item.icon-list-item--link }-->
- [Class
overview](https://developer.android.com/reference/com/google/android/material/tabs/TabLayout.html)
overview](https://developer.android.com/reference/com/google/android/material/tabs/TabLayout)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->

## Usage
Expand Down Expand Up @@ -62,10 +62,10 @@ tabs and lets the user quickly change between content views. These content views
are often held in a
[ViewPager](https://developer.android.com/reference/android/support/v4/view/ViewPager.html).

Use [setupWithViewPager(ViewPager)](https://developer.android.com/reference/com/google/android/material/tabs/TabLayout.html#setupWithViewPager(android.support.v4.view.ViewPager))
to link a `TabLayout` with a ViewPager. The
individual tabs in the `TabLayout` will be automatically populated with the page
titles from the PagerAdapter.
Use
[setupWithViewPager(ViewPager)](https://developer.android.com/reference/com/google/android/material/tabs/TabLayout#setupWithViewPager(ViewPager))
to link a `TabLayout` with a ViewPager. The individual tabs in the `TabLayout`
will be automatically populated with the page titles from the PagerAdapter.

```java
ViewPager pager;
Expand Down
Loading

0 comments on commit 73d1c6f

Please sign in to comment.