76 Commits

Author SHA1 Message Date
Frantisek Nagy
8210b3ac01 [CollapsingToolbarLayout] Fix CollapsingToolbar multiline position
GIT_ORIGIN_REV_ID=7dbd8905bf58eb5811c4661ee77512d4d9c59c19

Co-authored-by: ymarian <38727469+ymarian@users.noreply.github.com>
PiperOrigin-RevId: 321294325
2020-07-15 09:49:15 -07:00
marianomartin
049ad022a6 Delete components build.gradle files
PiperOrigin-RevId: 320944144
2020-07-15 09:38:31 -07:00
marianomartin
555356b03f Internal cleanup
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
Material Design Team
342ea9ad25 Internal cleanup
PiperOrigin-RevId: 317147378
2020-06-19 13:42:35 -04:00
Material Design Team
073382034a Migrate android.support.v4.content.ContextCompat to androidx
Android X migration

PiperOrigin-RevId: 315791679
2020-06-11 17:27:51 -07:00
Material Design Team
76ffe35fef Cleanup
PiperOrigin-RevId: 313865830
2020-06-01 16:52:06 -04:00
marianomartin
7e6dfce572 Bring back CollpasingToolbarLayout MaterialThemeOverlay support
PiperOrigin-RevId: 295971324
2020-02-19 13:27:47 -05:00
johan12345
d7554adce3 Add catalog demo for CollapsingToolbarLayout with mutliple lines
Resolves https://github.com/material-components/material-components-android/pull/413
Resolves https://github.com/material-components/material-components-android/issues/6

PiperOrigin-RevId: 294481434
2020-02-11 14:36:03 -05:00
marianomartin
83e4e47d22 Initial support for Multiline CollapsingToolbarLayout
This cl adds the capabilities to set multiline on CollapsingToolbarLayout while keeping single line toolbars unchanged.

Co-Authored-By: johan12345 <johan.forstner@gmail.com>
PiperOrigin-RevId: 294256516
2020-02-10 14:32:15 -05:00
cketcham
b467d65bc4 Add attributes from AppBar to public.xml
PiperOrigin-RevId: 293847895
2020-02-10 09:57:20 -05:00
isabellekim
1f9de68025 [All] Add support for materialThemeOverlay
Resolves https://github.com/material-components/material-components-android/pull/948

GIT_ORIGIN_REV_ID=5a8bb35a56c1b813df47d964de8482a26e0da66d
PiperOrigin-RevId: 293839172
2020-02-10 09:55:19 -05:00
Material Design Team
0a03911f89 Add more a11y support to AppBarLayout's BaseBehavior.
PiperOrigin-RevId: 289692654
2020-01-14 15:05:59 -08:00
dniz
2059499085 Fix AppBarLayout statusBarForeground issue where status bar drawable is drawn behind content
Resolves https://github.com/material-components/material-components-android/issues/824

PiperOrigin-RevId: 285981837
2019-12-17 17:07:12 -05:00
marianomartin
c266251ee9 Cleanup HeaderBehavior
PiperOrigin-RevId: 280004172
2019-11-12 16:24:26 -05:00
haodong
7bcd5f606e Fixed popup menu on action bar.
* Made sure light/dark theme always shows popup menu in corresponding theme.
* Increased contrast of text in popup menu in dark theme.

PiperOrigin-RevId: 278397458
2019-11-04 13:09:28 -05:00
marianomartin
115313c0c0 Expose a class for themeoverlay in style
This moves functionality from ThemeEnforcement into a stand alone class.

Resolves https://github.com/material-components/material-components-android/issues/665

PiperOrigin-RevId: 275481343
2019-10-21 10:24:19 -04:00
Seanghay
3d074701a8 [AppBarLayout] Added format to appBarLayoutStyle attribute
Resolves https://github.com/material-components/material-components-android/pull/649

GIT_ORIGIN_REV_ID=59f78a367d5a3fe61a51a55b7b5ff88d4cac2b7b
PiperOrigin-RevId: 272719500
2019-10-03 19:40:03 -04:00
Material Design Team
5f017cd5cd Migrate away from deprecated behavior annotation
PiperOrigin-RevId: 271616445
2019-09-27 14:59:16 -04:00
dniz
a6be8f7e5b Update Primary and Surface ActionBar Theme Overlays to inherit from AppCompat ActionBar Theme Overlay
PiperOrigin-RevId: 271134096
2019-09-26 17:55:49 -04:00
Material Design Team
5e9b0dd917 Automated g4 rollback of changelist 267646424
PiperOrigin-RevId: 267814621
2019-09-12 13:51:28 -04:00
Material Design Team
2d03e4084d Migrate away from deprecated behavior annotation
PiperOrigin-RevId: 267646424
2019-09-12 13:49:58 -04:00
marianomartin
215a839598 Internal cleanup
PiperOrigin-RevId: 267504117
2019-09-12 13:48:16 -04:00
dniz
72cfef981b Rename prefix mtrl_ to material_ in public resources
PiperOrigin-RevId: 265729121
2019-08-29 12:16:13 -04:00
cketcham
cb1674662a Add @NonNull and @Nullable annotations
PiperOrigin-RevId: 264619150
2019-08-26 11:01:22 -04:00
dniz
cc73c2a630 Update TODOs
PiperOrigin-RevId: 259535844
2019-07-23 11:21:39 -04:00
dniz
0512f776c5 Remove sub-package AndroidManifest.xml files from lib directory
PiperOrigin-RevId: 258390736
2019-07-16 13:18:32 -04:00
isabellekim
a628bf516b Revert the library to compile with Java 7: revert lambdas, add necessary casts, and make some variables final.
Continue compile shrine demo, catalog, and tests with Java 8.

PiperOrigin-RevId: 257874888
2019-07-15 19:19:23 -04:00
dniz
68ddfee0ed Remove Material's legacy androidx core_ui and core_utils dependencies in favor of more granular dependencies (coordinatorlayout, graphics, interpolator, customview)
PiperOrigin-RevId: 257452569
2019-07-10 15:17:12 -04:00
dniz
37534561f2 Add component styles that swap between primary and surface styles depending on light vs dark theme
Makes it easier for devs to implement: https://material.io/design/color/dark-theme.html#custom-application

PiperOrigin-RevId: 256208965
2019-07-03 14:11:49 -04:00
marianomartin
164bf0fabd Internal cleanup
PiperOrigin-RevId: 255609320
2019-07-03 14:02:53 -04:00
dniz
5df3bebd63 Update elevation overlays to be based absolute elevation, factoring in the elevation of all parent views
Will follow-up with TabLayout absolute elevation separately

Resolves https://github.com/material-components/material-components-android/issues/381

PiperOrigin-RevId: 255404830
2019-07-03 13:55:49 -04:00
marianomartin
367b295624 Internal cleanup
PiperOrigin-RevId: 254414602
2019-06-24 17:12:42 -04:00
dniz
3b7e1b4d71 Update AppBarLayout lift on scroll finding of liftOnScrollTargetViewId to be based on nested scrolling view instead of Activity when possible
PiperOrigin-RevId: 253637012
2019-06-18 13:47:01 -04:00
marianomartin
b9147d4f2d Remove some lint warnings from baseline
PiperOrigin-RevId: 253036361
2019-06-18 13:24:50 -04:00
cketcham
bff75f2d3e Update to lamdas
PiperOrigin-RevId: 252846439
2019-06-18 13:21:02 -04:00
marianomartin
5a5d311a36 Check more lint warnings, show warnings as errors.
PiperOrigin-RevId: 252822573
2019-06-18 13:20:15 -04:00
Material Design Team
3c5f9f6cb0 Migrate CoordinatorLayout android support libraries to androidx
PiperOrigin-RevId: 248819271
2019-05-21 12:03:28 -04:00
marianomartin
8b98949b5c Remove usages of widget.(AppBarLayout|TextInputLayout|TextInputEditText)
PiperOrigin-RevId: 248134329
2019-05-16 12:48:48 -04:00
dniz
8f622283d1 Remove CSL theme attribute workarounds
Also update androidx dependencies to get latest fixes: appcompat to 1.1.0-alpha04 and core to 1.1.0-alpha05

PiperOrigin-RevId: 246804285
2019-05-06 10:34:04 -04:00
dniz
249e6f5281 Implement new MaterialToolbar class that provides support for Dark Theme elevation overlays, if not using AppBarLayout
PiperOrigin-RevId: 243054730
2019-04-19 15:37:34 -04:00
Chris Banes
5b94ec83a7 Add statusBarForeground functionality to AppBarLayout
Currently AppBarLayout lacks the functionality which
CollapsingToolbarLayout does, to draw a drawable behind
the status bar. This CL adds that functionality.

Also added related functionality to Catalog

PiperOrigin-RevId: 242949840
2019-04-19 15:31:25 -04:00
dniz
6d4ffa29e3 AppBarLayout Dark Theme Elevation Overlays support, including animated overlay for Lift On Scroll
PiperOrigin-RevId: 241791205
2019-04-05 15:47:39 -04:00
Chris Banes
0425d3b475 Fix CollapsingToolbarLayout title bounds
Caused by AppBarLayout + WindowInset commit, which breaks some incorrect
assumptions in CTL. Fixed by breaking apart ViewOffsetHelper
so that its tracking of layout coordinates, and applying
offsets, are done at different times.

Also fixed catalog's AppBar sample layouts to set IDs,
enabling state restoration to work.

PiperOrigin-RevId: 239592953
2019-03-22 17:02:58 -04:00
Chris Banes
78054fe4ea AppBarLayout + WindowInset handling fixes
When AppBarLayout is used with a CollapsingToolbarLayout
child, it currently does not handle WindowInsets
very well. This commit fixes that by properly handling
insets.

The primary issue is when an AppBarLayout is used
with a single Toolbar (very common use case), where
the Toolbar will currently be displayed behind the status bar.

Another issue is with HeaderScrollingViewBehavior.
To workaround CoordinatorLayout using its 'compatible measuring'
for insets, the behavior manually sets the scrolling view to fit
system windows. This has other issues though because
that view will get padded in. Fixed by manually adding the insets
back into the measured dimensions.

Also updated the catalog layouts to make use of
android:fitsSystemWindows=true

Resolves https://github.com/material-components/material-components-android/pull/299

PiperOrigin-RevId: 238396626
2019-03-22 16:08:28 -04:00
dniz
fdbd553fc4 Set ActionMode background in Primary and Surface theme overlays
PiperOrigin-RevId: 234791713
2019-02-24 14:25:47 -05:00
Material Design Team
76a9b23443 Add SCROLL_FLAG_NO_SCROLL flag for AppBarLayout.LayoutParams
PiperOrigin-RevId: 234683507
2019-02-24 14:25:13 -05:00
dniz
80aedb96ab Update AppBarLayout to new NestedScrolling3 API
Fixes issue where item click is ignored within one second of fling

PiperOrigin-RevId: 229957998
2019-01-18 14:30:27 -05:00
dniz
11df79f95c Clean up Gradle build shorthands for appcompat/androidx libraries
PiperOrigin-RevId: 229369959
2019-01-18 14:13:26 -05:00
Material Design Team
3b066d9e65 Fix grammar in javadoc.
PiperOrigin-RevId: 227849552
2019-01-10 16:05:50 -05:00
cketcham
dc72aaeed4 Migrate Gradle build and sources to androidx
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00