2685 Commits

Author SHA1 Message Date
Cameron Ketcham
83e36b62e2 Updating to 1.1.0 stable 1.1.0 2020-02-03 11:23:07 -05:00
connieshi
c6b39c3bbe Add null check in #animateViewIn to guard against the post runnable executing after the view has been destroyed.
Resolves https://github.com/material-components/material-components-android/issues/917

PiperOrigin-RevId: 290300667
(cherry picked from commit bd7de3d41242b3433fc623977d53657ed8839012)
1.1.0-rc02
2020-01-17 14:34:36 -05:00
marianomartin
09d87fe6ee Change OnTabSelectedListener back to extend BaseOnTabSelectedListener
This brings back binary compatibility with 1.0.0 and 1.1.0-RC.

The reason this broke was because members were removed from the OnTabSelectedListener superclass set.
Which is not supported, regardless of whether tab OnTabSelectedListener still kept the same members.

https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.4.4

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

PiperOrigin-RevId: 290152502
(cherry picked from commit 3cd591fd71d90e5a357a5ee5549ad36f9c08fdf2)
2020-01-17 14:32:07 -05:00
marianomartin
6c4138803c Bring back removed TabLayout method for compatibility
Resolves https://github.com/material-components/material-components-android/issues/903

We accidentally removed this since it wasn't in 1.0.0 and it was deprecated. It exists to keep compatibility with version 27.0 of the library.

PiperOrigin-RevId: 289832106
(cherry picked from commit 17912e05993e6d4bef27c1db738af0e71f94ef29)
2020-01-17 14:27:14 -05:00
Ikebe, Ryohji
3e98044c9f [TabLayoutMediator] Prevent crash autoRefresh disabled mediator
Resolves https://github.com/material-components/material-components-android/pull/877

GIT_ORIGIN_REV_ID=db2949c4ed5358867e83b3e1cabad00e574ba5ba
PiperOrigin-RevId: 288822885

(cherry picked from commit 07931b65ba7b1f8179b75543b08fa4b2e4f06eb7)
2020-01-17 14:15:34 -05:00
leticiars
d5b2d818c3 Fixing crash happening when password toggle is clicked without the edit text having focus in TalkBack mode.
PiperOrigin-RevId: 286590576
(cherry picked from commit 8ed0ab79647374eef3d6b6d2270a00a4f0645803)
2020-01-17 14:08:45 -05:00
ikim24
c6812b2cd5 Update library version to 1.2.0-rc02 2020-01-17 12:47:21 -05:00
dniz
267e299a4e Update MaterialDatePicker to read colorSurface from correct context
Fixes issue where colorSurface from materialCalendarTheme is ignored

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

PiperOrigin-RevId: 286194512
(cherry picked from commit 4e0a016d07df0932af8490b11fffb2a928fe655e)
1.1.0-rc01
2019-12-18 15:59:18 -05:00
dniz
1a31ddc7d3 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
(cherry picked from commit 2059499085149ac7b0c8954b0d76bbe8b65bd0cb)
2019-12-18 15:53:41 -05:00
dniz
904d063bb4 Update Snackbar gesture inset calculation to factor in translationY
Fixes issue of compounding margins for legacy Snackbar which uses a slide animation that affects it's position on the screen

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

PiperOrigin-RevId: 285246645
(cherry picked from commit 86b2ec32437c1effeb9097bb7717d48c516d53d8)
2019-12-18 15:53:10 -05:00
cketcham
a718fd15f2 Add workaround to prevent FloatingActionButton crash on API 26.
Resolves https://github.com/material-components/material-components-android/issues/66

PiperOrigin-RevId: 284999697
(cherry picked from commit 3c3ac61c9126a7b97da7e10324be163c11257e53)
2019-12-18 15:51:35 -05:00
connieshi
267d79fa7d Add null check so that TabelLayoutMediator.detach can be called more than once without causing NPE.
Resolves https://github.com/material-components/material-components-android/issues/804

PiperOrigin-RevId: 284976120
(cherry picked from commit 7461eda024c4d70c179e03562345c6d64db9c99d)
2019-12-18 15:50:58 -05:00
haodong
88a67b0eb3 Fixed getDayCopy utility function in UtcDates for DatePicker.
- was copying year/month/date fields between Calendar objects in different time zones.
- convert input Calendar object into a Calendar object in UTC, then copy year/month/date fields to the return Calendar object.

PiperOrigin-RevId: 284597830
(cherry picked from commit 6694175a5f208ccce363fb7631a1b569f52617dc)
2019-12-18 15:50:04 -05:00
dniz
dbd7079c83 Update androidx coordinatorlayout dependency to 1.1.0 stable
PiperOrigin-RevId: 284548325
(cherry picked from commit 8cb00cb755915006649808e435199ec7485e795d)
2019-12-18 15:48:07 -05:00
haodong
ff5993dbbe Fixed MaterialDatePicker todayInUtcMilliseconds method.
- Used UtcDates to return the UTC milliseconds of today in local timezone.
- Previous method is replaced with thisMonthInUtcMilliseconds, which fits its function better.
Resolves https://github.com/material-components/material-components-android/issues/778

PiperOrigin-RevId: 283981946
(cherry picked from commit 77ce281f04d1ee603d2bac24bb98791949c51ae7)
2019-12-18 15:45:38 -05:00
melaniegoetz
6178e71463 Update BottomSheet to have a singular SettleRunnable
Resolves https://github.com/material-components/material-components-android/issues/516

PiperOrigin-RevId: 283802793
(cherry picked from commit e0578295e153d3ddfdc5b11db362e9bc4314697b)
2019-12-18 15:44:06 -05:00
sadeghpro
996a484a2c [dialog] Fix multichoice and singlechoice alert dialog in rtl mode of old api
Resolves https://github.com/material-components/material-components-android/pull/753

Co-authored-by:hunterstich <hunterstich@google.com>

GIT_ORIGIN_REV_ID=f7475a875d5b9a30fa56928baa43cc2c513a1fe5
PiperOrigin-RevId: 283797976

(cherry picked from commit c4ce69756d458600d0a628311fd5a78b713775c8)
2019-12-18 15:42:23 -05:00
connieshi
5b9402ecca Support tinted chip icons.
Resolves https://github.com/material-components/material-components-android/issues/767

PiperOrigin-RevId: 283387208
(cherry picked from commit d25fa920210b4fd38bd427a24255962cab0f2749)
2019-12-18 15:39:40 -05:00
Andreas Rossbacher
db34e5e0f3 [CardView] Fix potential Proguard/Dexguard/R8(?) optimization problem
Resolves https://github.com/material-components/material-components-android/pull/790

GIT_ORIGIN_REV_ID=fddc631d7a7c010044ab66247bec85f0aba097aa
PiperOrigin-RevId: 282769919

(cherry picked from commit db7fde2cd6a3bd3dc57d074fc67d12f45fcaa9d9)
2019-12-18 15:37:27 -05:00
cketcham
28415096e8 Update ViewPager2 dependency
PiperOrigin-RevId: 282352846
(cherry picked from commit bb50777461dd948e8925a3d3dca1178fa64fca06)
2019-12-18 15:36:03 -05:00
hunterstich
d142d69f3c Add materialAlertDialogTheme to public resources.
Resolves https://github.com/material-components/material-components-android/issues/769

PiperOrigin-RevId: 281547191
(cherry picked from commit 7601cfda8e2fb853e7b9d6e7c4c6ace7c542f711)
2019-12-18 15:33:29 -05:00
connieshi
a73ac925ad Remove attrs check inside Chip#initMinTarget because the current context's theme may have custom values.
PiperOrigin-RevId: 281519201
(cherry picked from commit 39e62ec2203e69b9e5b146b51c6e681e54c680a9)
2019-12-18 15:30:09 -05:00
connieshi
33321d528f Update chip's public.xml to include attributes for chipIconTint and closeIconTint
PiperOrigin-RevId: 281119011
(cherry picked from commit 2eb666a7d8e5270ea727df773178937b7ce01a2c)
2019-12-18 15:22:43 -05:00
ldjesper
945a220138 Include separator characters for Samsung devices in MaterialDatePicker
Resolves https://github.com/material-components/material-components-android/issues/682

PiperOrigin-RevId: 279146671
(cherry picked from commit 62a2164f1808a559c0ddb799aff4965f3669f20b)
2019-12-18 15:16:36 -05:00
ldjesper
cc1cfd7acc Separate date format string from date hint string in MaterialDatePicker for better hints.
Resolves https://github.com/material-components/material-components-android/issues/695

PiperOrigin-RevId: 279095896
(cherry picked from commit c097d3d33506be7382d3bda20909d5f08bb1f220)
2019-12-18 15:14:51 -05:00
Daniel Nizri
1f338fed94 Update version to rc01 2019-12-18 15:14:07 -05:00
dniz
6a767d7818 Update ElevationOverlayProvider compositeOverlay() to preserve original background color alpha
PiperOrigin-RevId: 278625128
(cherry picked from commit 7f043206c0407e075f516a8cf4e3c5940d7f76bc)
1.1.0-beta02
2019-11-07 11:09:42 -05:00
connieshi
de444c65be Fix bug in bottom navigation badge state restoration that did not set the badges on the menu item views.
Update catalog demo to save and restore states in the bottom navigation demos.

PiperOrigin-RevId: 278436621
(cherry picked from commit de005027bc55f66d361daefd938e873e3a62af45)
2019-11-07 11:00:26 -05:00
marianomartin
4646e2067d Fix BottomNavigationView SavedState bug for null loader
Resolves https://github.com/material-components/material-components-android/issues/549

PiperOrigin-RevId: 278416562
(cherry picked from commit 56fbbe9ee525f07f2fc9e5506cd5bed3bd8f76cf)
2019-11-07 10:57:21 -05:00
haodong
d8868df093 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
(cherry picked from commit 7bcd5f606e3c6ffe912204b4e35fc1b75d023a0b)
2019-11-07 10:56:36 -05:00
leticiars
6df6a92070 Fixing text field icons that are not clickable having ripple effect when text field is pressed.
Non clickable ImageViews inherit pressed state of parent views, so icons appeared as pressed even if they were not clickable/focusable.

PiperOrigin-RevId: 278381886
(cherry picked from commit 27f7f4c6bacbf94fb31cb48a79723b9b66097ff0)
2019-11-07 10:49:37 -05:00
hunterstich
5fe1ea399f Add onBackground ColorStateLists
PiperOrigin-RevId: 277818139
(cherry picked from commit f89b09f5122a21b33b45b6988660fa97d89e9229)
2019-11-07 10:47:33 -05:00
Gaetan Muller
977d9ed49d Update to CoordinatorLayout 1.1.0-rc01 and ViewPager2 1.0.0-rc01
Resolves https://github.com/material-components/material-components-android/pull/702

GIT_ORIGIN_REV_ID=d71af06902e66c5cab77b0c4d91d00849510d301
PiperOrigin-RevId: 277553782

(cherry picked from commit f157bffb4f253dfed1298c913c73d47b85fac535)
2019-11-07 10:45:07 -05:00
dniz
a23557bbb7 Add popupMenuBackground theme attribute and combine light and dark Menu styles
into one style that references the new attribute

PiperOrigin-RevId: 277340044
(cherry picked from commit aa7d83333e58de31ab37f0c11733cebf55d8e28e)
2019-11-07 10:44:14 -05:00
hunterstich
d10a01474b Update ExtendedFAB to use ShapeAppearanceModel.PILL
PiperOrigin-RevId: 277302581
(cherry picked from commit fdc243959f4ca5394afea1395682c87fd65a455b)
2019-11-07 10:25:46 -05:00
Nikita
1f0a67fe4e Improve scroll behavior of MaterialCalendar on low end devices
Resolves https://github.com/material-components/material-components-android/pull/711

GIT_ORIGIN_REV_ID=7808f83d1c4de45711aae4c5f1740506b5484c1c
PiperOrigin-RevId: 277201251

(cherry picked from commit b575fc78dd9abfa285700aaa2eaacf4ca441317d)
2019-11-07 10:22:32 -05:00
Material Design Team
2d18c612d6 Expand TLM to TabLayoutMediator in Javadoc
This makes it consistent with the rest of the references in the Javadoc.

PiperOrigin-RevId: 277090650
(cherry picked from commit de92a9fa3b9e0fb2415f70db8d8a3fbed1b6ac06)
2019-11-07 10:20:56 -05:00
marianomartin
8e923bdb65 [MaterialButtonToggleGroup] Fix corners after changing view visibility
People might want to set some of the buttons to GONE, this cl makes sure
the shape appearances remain coherent after doing so dynamically.

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

PiperOrigin-RevId: 276508915
(cherry picked from commit 9fc13777550b4378a48aea22f46b7656805a20c8)
2019-11-07 10:20:07 -05:00
marianomartin
beb547b63e Support orientation VERTICAL in MaterialButtonToggleGroup
Resolves https://github.com/material-components/material-components-android/issues/476

PiperOrigin-RevId: 273514626
(cherry picked from commit 24ab59af6c85b313519a14c04ad65f0ee15fb53f)
2019-11-07 10:19:56 -05:00
marianomartin
ef43f1b423 Fix crash in catalog demos
Resolves https://github.com/material-components/material-components-android/issues/572

PiperOrigin-RevId: 267997380
(cherry picked from commit aee272bb416ec56763eea90bc493fd8c8829f17e)
2019-11-07 10:16:03 -05:00
leticiars
195b176cd9 Error icon should only be visible if error is enabled.
Resolves https://github.com/material-components/material-components-android/issues/587

PiperOrigin-RevId: 276153474
(cherry picked from commit d0307dc9749c3f96043d1f21aea51ed2a0f19a36)
2019-11-07 10:12:05 -05:00
hunterstich
75a7b087e8 Update AndroidX Transition dep to 1.2.0 stable.
PiperOrigin-RevId: 274171699
(cherry picked from commit 9edf5d3f6c7a85be9bf4a3531e0c0bde4080174d)
2019-11-07 10:05:52 -05:00
cketcham
8d8a7a7e8e Fix FAB placement relative to the BottomAppBar when system insets change
PiperOrigin-RevId: 274158808
(cherry picked from commit 10c0f629724a5e4f529abb2432eead3a85a1cf3d)
2019-11-07 10:04:59 -05:00
Gaetan Muller
299bd593b6 Update to ViewPager2 1.0.0-beta05
Resolves https://github.com/material-components/material-components-android/pull/666

GIT_ORIGIN_REV_ID=181393f995292a37a1620ea7f67f36157001512e
PiperOrigin-RevId: 273962103

(cherry picked from commit ecaa6f604605f79a511c496a82add5cbcb47361d)
2019-11-06 11:16:06 -05:00
hunterstich
74fe23ecc1 Update AndroidX Transition gradle dep to 1.2.0
Resolves https://github.com/material-components/material-components-android/issues/530

PiperOrigin-RevId: 273792067
(cherry picked from commit 12ece687c1fded76ec7f538d2dd890a620ee6f6a)
2019-11-06 11:14:32 -05:00
ldjesper
b06130ee17 Sentence case all non-titles in MaterialDatePicker
PiperOrigin-RevId: 273592300
(cherry picked from commit 9cd22eb30a37881b329b9edc56e71a2a5fd2717d)
2019-11-06 11:07:10 -05:00
marianomartin
6f429e7b65 [NavigationView] Logic error when drawing nav bar scrim
Resolves https://github.com/material-components/material-components-android/issues/629

PiperOrigin-RevId: 273365055
(cherry picked from commit f71d80a96016c040f16ca6d3a5782927a51f7c0b)
2019-11-06 10:58:33 -05:00
dniz
75e20b78fa Update Snackbar to respect left/right system window insets
PiperOrigin-RevId: 272667571
(cherry picked from commit 0c8c6f6249839a19165209c0634da143c862cb37)
2019-11-06 10:56:16 -05:00
Leticia Santos
a347344a45 Update library version to 1.1.0-beta02 2019-11-06 10:29:51 -05:00
marianomartin
410bc07d64 Change MaterialButtonToggleGroup to extend LinearLayout
PiperOrigin-RevId: 272989081
(cherry picked from commit a405dd9664731e128323595e2934827f838d2e9f)
1.1.0-beta01
2019-10-04 22:25:34 -04:00