Permalink
Browse files

Update docs to point to new widget class locations

PiperOrigin-RevId: 193539651
  • Loading branch information...
dsn5ft committed Apr 19, 2018
1 parent a4815b0 commit 375eb8220bcb83379de29cc39503665d37c9ba09
@@ -16,7 +16,7 @@ Material Components for Android are based on Android’s Design support library
- [All Components](https://github.com/material-components/material-components-android/tree/master/lib/)
- [Contributing](docs/contributing.md)
- [Class
documentation](https://developer.android.com/reference/com/google/android/material/widget/package-summary.html)
documentation](https://developer.android.com/reference/com/google/android/material/package-summary.html)
(external site)
- [MDC-Android on Stack
Overflow](https://www.stackoverflow.com/questions/tagged/material-components+android)
@@ -25,11 +25,11 @@ responsiveness to scrolling.
techniques](https://material.io/guidelines/patterns/scrolling-techniques.html)
<!--{: .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/widget/AppBarLayout.java)
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/appbar/AppBarLayout.java)
<!--{: .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/widget/AppBarLayout.html)
overview](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.html)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->
As a container for Toolbars, and other views, it works with
@@ -45,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/widget/AppBarLayout.LayoutParams.html#SCROLL_FLAG_ENTER_ALWAYS)
* [enterAlwaysCollapsed](https://developer.android.com/reference/com/google/android/material/widget/AppBarLayout.LayoutParams.html#SCROLL_FLAG_ENTER_ALWAYS_COLLAPSED)
* [exitUntilCollapsed](https://developer.android.com/reference/com/google/android/material/widget/AppBarLayout.LayoutParams.html#SCROLL_FLAG_EXIT_UNTIL_COLLAPSED)
* [scroll](https://developer.android.com/reference/com/google/android/material/widget/AppBarLayout.LayoutParams.html#SCROLL_FLAG_SCROLL)
* [snap](https://developer.android.com/reference/com/google/android/material/widget/AppBarLayout.LayoutParams.html#SCROLL_FLAG_SNAP)
* [snapMargins](https://developer.android.com/reference/com/google/android/material/widget/AppBarLayout.LayoutParams.html#SCROLL_FLAG_SNAP_MARGINS)
* [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)
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
@@ -43,7 +43,7 @@ Here's an example of how to include the widget in your layout:
android:layout_gravity="bottom"
app:navigationIcon="@drawable/ic_menu_24"/>
<com.google.android.material.widget.FloatingActionButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -24,11 +24,11 @@ navigate to.
Navigation](https://material.io/guidelines/components/bottom-navigation.html)
<!--{: .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/widget/BottomNavigationView.java)
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/bottomnavigation/BottomNavigationView.java)
<!--{: .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/widget/BottomNavigationView.html)
overview](https://developer.android.com/reference/com/google/android/material/bottomnavigation/BottomNavigationView.html)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->
## Usage
@@ -53,7 +53,7 @@ A typical layout file would look like this:
<!-- Main content -->
<com.google.android.material.widget.BottomNavigationView
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -89,7 +89,7 @@ For example, you could have a `bottom_navigation_colors.xml` that contains:
And you would use it like this on your `BottomNavigationView`:
```xml
<com.google.android.material.widget.BottomNavigationView
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -29,10 +29,10 @@ Note: If you want to use Bottom Sheets that are modal (dialogs), use
Sheets](https://material.io/guidelines/components/bottom-sheets.html#bottom-sheets-persistent-bottom-sheets)
<!--{: .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/widget/BottomSheetBehavior.java)
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/widget/BottomSheetBehavior.html)
overview](https://developer.android.com/reference/com/google/android/material/bottomsheet/BottomSheetBehavior.html)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->
## Usage
@@ -28,11 +28,11 @@ Note: To implement non-modal **Persistent bottom sheets** use
Sheets](https://material.io/guidelines/components/bottom-sheets.html#bottom-sheets-modal-bottom-sheets)
<!--{: .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/widget/BottomSheetDialogFragment.java)
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/bottomsheet/BottomSheetDialogFragment.java)
<!--{: .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/widget/BottomSheetDialogFragment.html)
overview](https://developer.android.com/reference/com/google/android/material/bottomsheet/BottomSheetDialogFragment.html)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->
## Usage
@@ -16,7 +16,7 @@ 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/widget/AppBarLayout.html),
[`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),
[`Toolbar`](https://developer.android.com/reference/android/support/v7/widget/Toolbar.html),
and a scrollable content view, such as
@@ -31,10 +31,10 @@ and a scrollable content view, such as
behavior](https://material.io/guidelines/patterns/scrolling-techniques.html#scrolling-techniques-behavior)
<!--{: .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/widget/CollapsingToolbarLayout.java)
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/widget/CollapsingToolbarLayout.html)
overview](https://developer.android.com/reference/com/google/android/material/appbar/CollapsingToolbarLayout.html)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->
## Usage
@@ -54,11 +54,11 @@ A layout with a collapsing toolbar might look something like this:
<!-- Scrollable view here -->
<com.google.android.material.widget.AppBarLayout
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="@dimen/tall_toolbar_height">
<com.google.android.material.widget.CollapsingToolbarLayout
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:contentScrim="?attr/colorPrimary"
@@ -69,8 +69,8 @@ A layout with a collapsing toolbar might look something like this:
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"/>
</com.google.android.material.widget.CollapsingToolbarLayout>
</com.google.android.material.widget.AppBarLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>
```
@@ -84,7 +84,7 @@ multipliers in the XML for as many of the siblings as you like.
A toolbar with a collapsing image might look something like this:
```xml
<com.google.android.material.widget.CollapsingToolbarLayout
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:contentScrim="?attr/colorPrimary"
@@ -105,15 +105,15 @@ A toolbar with a collapsing image might look something like this:
android:layout_width="match_parent"
android:layout_height="@dimen/shrine_toolbar_collapsed_height"
app:layout_collapseMode="pin"/>
</com.google.android.material.widget.CollapsingToolbarLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>
```
You can combine the basic collapsing toolbar with scroll flags,
`CollapsingToolbarLayout`'s attributes, `TabViewLayout`, or any other view you
would like to achieve your desired toolbar.
* Make sure to call
[`setTitle()`](https://developer.android.com/reference/com/google/android/material/widget/CollapsingToolbarLayout.html#setTitle\(java.lang.CharSequence\))
[`setTitle()`](https://developer.android.com/reference/com/google/android/material/appbar/CollapsingToolbarLayout.html#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.
@@ -128,5 +128,5 @@ would like to achieve your desired toolbar.
## Related Concepts
* [AppBarLayout](https://developer.android.com/reference/com/google/android/material/widget/AppBarLayout.html)
* [TabLayout](https://developer.android.com/reference/com/google/android/material/widget/TabLayout.html)
* [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)
@@ -29,10 +29,10 @@ other UI elements on the screen.
Buttons](https://material.io/guidelines/components/buttons-floating-action-button.html)
<!--{: .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/widget/FloatingActionButton.java)
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/widget/FloatingActionButton.html)
overview](https://developer.android.com/reference/com/google/android/material/floatingactionbutton/FloatingActionButton.html)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->
## Usage
@@ -50,7 +50,7 @@ widget in your layout:
<!-- Main content -->
<com.google.android.material.widget.FloatingActionButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/floating_action_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -82,7 +82,7 @@ The updated Material `FloatingActionButton` style consists of updated elevation,
ripple, and motion changes.
```xml
<com.google.android.material.widget.FloatingActionButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/floating_action_button"
style="@/style/Widget.MaterialComponents.FloatingActionButton"
android:layout_width="wrap_content"
@@ -95,7 +95,7 @@ ripple, and motion changes.
#### Legacy Material Style
```xml
<com.google.android.material.widget.FloatingActionButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/floating_action_button"
style="@/style/Widget.Design.FloatingActionButton"
android:layout_width="wrap_content"
@@ -25,10 +25,10 @@ side, used to display in-app navigation links.
## Design & API Documentation
- [Class
definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/widget/NavigationView.java)
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/widget/NavigationView.html)
overview](https://developer.android.com/reference/com/google/android/material/navigation/NavigationView.html)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->
## Usage
@@ -38,7 +38,7 @@ side, used to display in-app navigation links.
the menu.
```xml
<com.google.android.material.widget.NavigationView
<com.google.android.material.navigation.NavigationView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
@@ -89,7 +89,7 @@ this:
<!-- Your content goes here -->
</android.support.design.widget.CoordinatorLayout>
<com.google.android.material.widget.NavigationView
<com.google.android.material.navigation.NavigationView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
@@ -26,10 +26,10 @@ action that was just taken, or retrying an action that had failed.
Snackbars](https://material.io/guidelines/components/snackbars-toasts.html)
<!--{: .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/widget/Snackbar.java)
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/widget/Snackbar.html)
overview](https://developer.android.com/reference/com/google/android/material/snackbar/Snackbar.html)
<!--{: .icon-list-item.icon-list-item--link }--> <!--{: .icon-list }-->
## Usage
@@ -45,9 +45,9 @@ could be found.
**Available duration presets are:**
- [LENGTH_INDEFINITE](https://developer.android.com/reference/com/google/android/material/widget/Snackbar.html#LENGTH_INDEFINITE)
- [LENGTH_LONG](https://developer.android.com/reference/com/google/android/material/widget/Snackbar.html#LENGTH_LONG)
- [LENGTH_SHORT](https://developer.android.com/reference/com/google/android/material/widget/Snackbar.html#LENGTH_SHORT)
- [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)
**NOTE:** Snackbars work best if they are displayed inside of a
[CoordinatorLayout](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.html).
@@ -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/widget/BaseTransientBottomBar.html).
[BaseTransientBottomBar](https://developer.android.com/reference/com/google/android/material/snackbar/BaseTransientBottomBar.html).
Android also provides a
[Toast](https://developer.android.com/reference/android/widget/Toast.html) class
Oops, something went wrong.

0 comments on commit 375eb82

Please sign in to comment.