98 Commits

Author SHA1 Message Date
dniz
b0240d9a77 [Resources] Fixed the types of some public attrs
Resolves https://github.com/material-components/material-components-android/issues/1560

PiperOrigin-RevId: 325010287
2020-08-05 10:59:36 -04: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
dniz
8851f703d8 [Theming] Move Design widget styles back to full themes from Bridge themes
Makes the Bridge themes a more true no-op when migrating from a Theme.AppCompat or Theme.Design theme and using legacy Widget.Design component styles

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

PiperOrigin-RevId: 317306206
2020-06-19 14:01:34 -04:00
Material Design Team
7a300c134f Fix MaterialAlertDialog getting dismissed on any MotionEvent.
PiperOrigin-RevId: 305275984
2020-04-09 05:14:38 -07:00
Material Design Team
b9428363d7 Add nullness annotations to input parameters
PiperOrigin-RevId: 301697159
2020-03-24 11:31:35 -04:00
isabellekim
983ee3d47b Use text buttons for framework AlertDialogs in V21+. The library does not encourage usage of the framework AlertDialog (use the AppCompat one instead), however this change is to help support areas that do use the framework AlertDialog, like preferences.
Note: the default theme (android:alertDialogTheme) for framework alert dialogs pre-21 is not a public resource and therefore we cannot inherit from that theme. For this reason, we are not changing the buttons for AlertDialogs pre-21 (they will continue to use the framework default). They will, however, look like the typical pre-21 framework AlertDialogs once MaterialButton supports android:background.
PiperOrigin-RevId: 295263002
2020-02-18 16:44:15 -05:00
isabellekim
4abe78eec6 Add attributes for dialogs that should be public to public.xml
PiperOrigin-RevId: 294473825
2020-02-11 14:35:34 -05:00
isabellekim
687bb7ba2c Updating dialog theme attributes.
Resolves https://github.com/material-components/material-components-android/issues/799

PiperOrigin-RevId: 292978156
2020-02-03 15:54:04 -05:00
sadeghpro
c4ce69756d [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
2019-12-05 14:38:51 -05:00
hunterstich
7601cfda8e Add materialAlertDialogTheme to public resources.
Resolves https://github.com/material-components/material-components-android/issues/769

PiperOrigin-RevId: 281547191
2019-11-22 21:23:33 +00: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
dniz
aa7d83333e Add popupMenuBackground theme attribute and combine light and dark Menu styles
into one style that references the new attribute

PiperOrigin-RevId: 277340044
2019-11-01 13:28:40 -07: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
ldjesper
294f12498d Rename setCornerRadius to setAllCornerSizes
PiperOrigin-RevId: 272959729
2019-10-04 20:08:43 -04:00
dniz
b99709200e Add support for Snackbar message text styling via snackbarTextViewStyle attr
PiperOrigin-RevId: 272198481
2019-10-01 12:35:27 -04:00
dniz
b1a6256ac1 Move Material-only default component styles from full themes to bridge themes
The Bridge themes are guaranteed to be a no-op when migrating from an AppCompat theme, so we can set any new attributes introduced by Material in the Bridge themes.

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

PiperOrigin-RevId: 272021042
2019-10-01 04:07:53 -04:00
cketcham
e44b7f765d Add default slider style to the themes
PiperOrigin-RevId: 268693120
2019-09-12 14:28:12 -04:00
marianomartin
215a839598 Internal cleanup
PiperOrigin-RevId: 267504117
2019-09-12 13:48:16 -04:00
marianomartin
0d4515cb46 Internal cleanup
PiperOrigin-RevId: 265971745
2019-08-29 14:59:20 -04:00
dniz
72cfef981b Rename prefix mtrl_ to material_ in public resources
PiperOrigin-RevId: 265729121
2019-08-29 12:16:13 -04:00
cketcham
78f945776a Add @NonNull and @Nullable annotations
PiperOrigin-RevId: 265057424
2019-08-29 11:08:56 -04:00
dniz
0512f776c5 Remove sub-package AndroidManifest.xml files from lib directory
PiperOrigin-RevId: 258390736
2019-07-16 13:18:32 -04:00
ldjesper
39f4a36d0b Remove Abstract Calendar Pickers in favor of options
PiperOrigin-RevId: 256402016
2019-07-03 14:16:01 -04:00
dniz
f2db1d9ac9 Add color theme attributes that swap between primary and surface colors 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: 255962470
2019-07-03 14:05:18 -04:00
marianomartin
164bf0fabd Internal cleanup
PiperOrigin-RevId: 255609320
2019-07-03 14:02:53 -04:00
dniz
6783f9e1cd Clean up naming of elevation overlay methods and attributes
PiperOrigin-RevId: 253283047
2019-06-18 13:34:29 -04:00
ldjesper
bc36b699cc Fix MaterialAlertDialogBuilder to resepct setCanceledOnTouchOutside by removing onBackPress call in favor of click with fixed outside location
PiperOrigin-RevId: 250555478
2019-05-29 17:03:26 -04:00
dniz
daa3a04069 DayNight Bridge Themes
Also add some non-Base dialog themes that were missing

PiperOrigin-RevId: 250520918
2019-05-29 16:30:39 -04:00
cketcham
6e250a6a0d Add colorSecondary to bridge themes
PiperOrigin-RevId: 250495874
2019-05-29 16:28:16 -04:00
leticiars
b8f9f5e91a Setting android:contextPopupMenuStyle in dialog themes.
PiperOrigin-RevId: 249679678
2019-05-24 14:26:11 -04:00
connieshi
ebaccf5a85 Add support for badgeStyle, a theme level style attribute for customizing the appearance of badges.
PiperOrigin-RevId: 249338990
2019-05-24 14:16:22 -04:00
dniz
53abdffe40 Fix non-base dialog bridge themes
PiperOrigin-RevId: 249255677
2019-05-24 14:12:18 -04:00
leticiars
0f7eaaa94f Adding styling for ListPopupWindow along with dark theme support.
PiperOrigin-RevId: 249244399
2019-05-24 14:10:53 -04:00
marianomartin
90837ec485 Internal cleanup
PiperOrigin-RevId: 249243403
2019-05-21 12:15:07 -04:00
dniz
c32a7b5548 Fix typo in Base.Theme.MaterialComponents.Dialog.MinWidth.Bridge theme name
PiperOrigin-RevId: 249079599
2019-05-21 12:11:23 -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
34a3a46f61 Update Tabs to default to surface style in Dark Theme
PiperOrigin-RevId: 245217332
2019-04-29 15:39:42 -07:00
dniz
d5ab5910dc Update Bottom Navigation to default to surface style in Dark Theme
PiperOrigin-RevId: 245041248
2019-04-29 15:31:01 -07:00
dniz
5249f54ab1 Update AppBarLayout and ActionBar to default to surface style in Dark Theme
Also update Dark Theme colorPrimaryDark to be #000000 to match

PiperOrigin-RevId: 245028116
2019-04-29 15:30:11 -07:00
ldjesper
24a2502e15 Split windowBackground into pre-21
PiperOrigin-RevId: 244055856
2019-04-19 21:30:42 -04:00
ldjesper
59070cc111 Simplified the redundant naming of MaterialAttributes static methods.
Added default values for non-throw cases.
Avoid returning TypedValue to simplify code using the helper methods.

PiperOrigin-RevId: 244007695
2019-04-19 21:27:28 -04:00
ldjesper
b2aa764e38 Default Dialog windowBackground color to colorSurface for darkmode pickers.
PiperOrigin-RevId: 243849451
2019-04-19 21:14:52 -04:00
ldjesper
a94152a475 Change GM Dialog elevation to 6dp (which improves text contrast) and correct theme loading order such that materialAlertDialogTheme correctly overrides attributes in alertDialogTheme.
PiperOrigin-RevId: 243708330
2019-04-19 21:09:36 -04:00
ldjesper
9809b797bf Shrink inset margins for landscape mode of dialogs
PiperOrigin-RevId: 243103737
2019-04-19 15:42:29 -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
dniz
760a99f883 Enable Elevation Overlays for Dark Themes and update surface colors to match spec
PiperOrigin-RevId: 240425682
2019-03-26 17:35:50 -04:00
marianomartin
912045f642 [Menu] Add overlay color for APIs 23 and up
PiperOrigin-RevId: 239214849
2019-03-22 16:52:26 -04:00
ldjesper
d75c00043d Use ViewCompat for getElevation for MaterialAlertDialogBuilder
PiperOrigin-RevId: 238543065
2019-03-22 16:14:19 -04:00
ldjesper
19b696015a Apply Elevation Overlay for Dark Theme Dialogs
PiperOrigin-RevId: 238535985
2019-03-22 16:11:50 -04:00