61 Commits

Author SHA1 Message Date
rightnao
dcfbdff79c [TopAppBar] Add attribute to center based on whole container
PiperOrigin-RevId: 747496721
2025-04-17 23:56:54 +00:00
pubiqq
bc2fdeadaf [Internal] Prefer platform methods to compat ones
Resolves https://github.com/material-components/material-components-android/pull/4532

GIT_ORIGIN_REV_ID=180dec736f2521579e483317a4d537629d8f247b
PiperOrigin-RevId: 715494344
2025-01-15 18:06:07 +00:00
pekingme
32633a6ff4 [TopAppBar] Applied formatting only.
PiperOrigin-RevId: 713744692
2025-01-10 15:26:13 +00:00
pekingme
57297ae59d [CollapsingToolbarLayout] Added multiple subtitle support.
PiperOrigin-RevId: 713365011
2025-01-09 13:49:55 +00:00
pekingme
8598aa6ae9 [CollapsingToolbarLayout] Fixed incorrect title and subtitle positioning.
PiperOrigin-RevId: 712776905
2025-01-07 14:33:47 +00:00
pekingme
782d2607da [Collapsing Toolbar] Removed the gravity APIs for subtitle (subtitle shares same gravity as title).
PiperOrigin-RevId: 704844851
2024-12-16 13:01:25 +00:00
pekingme
73b577dd6a [TopAppBar] Added collapsing subtitle.
PiperOrigin-RevId: 700042153
2024-12-02 19:42:27 +00:00
rightnao
7f01739644 [TextInputLayout] Add hintMaxLines attribute
PiperOrigin-RevId: 685884472
2024-10-15 16:51:14 +00:00
pubiqq
23aca03255 [Internal] Remove pre-Lollipop checks
Resolves https://github.com/material-components/material-components-android/pull/4266

GIT_ORIGIN_REV_ID=1de7808e66dd6666c893217c76c7499afe2df6a3
PiperOrigin-RevId: 669688797
2024-09-03 13:31:29 +00:00
dsn5ft
5371290913 [CollapsingToolbarLayout] Refactor multiline rotation fix to address related issue caused by keyboard
PiperOrigin-RevId: 645057096
2024-06-20 18:19:59 +00:00
dsn5ft
2bc1a2f344 [CollapsingToolbarLayout] Fix issues related to rotating multiline collapsing toolbars
PiperOrigin-RevId: 636597914
2024-05-24 15:33:53 +00:00
pubiqq
510881a469 [Internal] Stop using deprecated androidx.core.view.* methods
Resolves https://github.com/material-components/material-components-android/pull/4117

GIT_ORIGIN_REV_ID=dd157e8360c2511810496693cec1616fce578655
PiperOrigin-RevId: 632284856
2024-05-13 17:37:38 +00:00
Ga\u00ebtan Muller
b3fe6a7f61 [Cleanup] Remove redundant version checks for api <= 19.
Resolves https://github.com/material-components/material-components-android/pull/3849

GIT_ORIGIN_REV_ID=47bb2fcc8031740e5a7d4f741f1ada2af025e126
PiperOrigin-RevId: 632154861
2024-05-09 18:46:02 +00:00
dsn5ft
5f2b4b2531 [CollapsingToolbarLayout] Fixed title collapse fade mode color to use a Tonal Surface role instead of elevation overlay
Resolves https://github.com/material-components/material-components-android/issues/3525

PiperOrigin-RevId: 564678269
2023-09-12 10:48:57 -04:00
rightnao
e3b255b3a0 [Docs] Crosslink github docs in javadocs
PiperOrigin-RevId: 546393704
2023-07-11 19:37:37 +00:00
rightnao
c8108b1f8e [TopAppBar] Update motion specs
PiperOrigin-RevId: 480953621
2022-10-13 21:01:26 +00:00
rightnao
29bed9a021 [CollapsingToolbarLayout] Exposing methods to set text size for collapsed and expanded text size
Resolves https://github.com/material-components/material-components-android/issues/775

PiperOrigin-RevId: 465391478
2022-08-05 19:10:31 +00:00
dsn5ft
241aa5cd8b [CollapsingToolbarLayout] Added experimental API to allow generic customizations of the StaticLayout.Builder used for the title text
Example usage:

```
collapsingToolbarLayout.setStaticLayoutBuilderConfigurer(
    builder ->
        builder.setLineBreakConfig(
            new LineBreakConfig.Builder()
                .setLineBreakWordStyle(LineBreakConfig.LINE_BREAK_WORD_STYLE_PHRASE)
                .build()));
```

PiperOrigin-RevId: 455625977
2022-06-23 18:32:33 +00:00
pubiqq
382ce9c792 [TopAppBar] Fix copy constructors
Resolves https://github.com/material-components/material-components-android/pull/2686

GIT_ORIGIN_REV_ID=7f62b56c7edf01046e85b474d1cf0f17c6153b68
PiperOrigin-RevId: 450440535
2022-05-23 11:20:15 -04:00
Venugopal Rao Gubbala
7b043c3b68 [CollapsingToolbarLayout] Allow application to Set ellipsis to Title in CollapsingToolBar
Resolves https://github.com/material-components/material-components-android/pull/2636

GIT_ORIGIN_REV_ID=f6c2b07c1eb936ed2de47b7586688a5f6b322e48
PiperOrigin-RevId: 445200467
2022-04-28 16:26:58 -04:00
Material Design Team
cfc00aa5a3 Update android core class definitions across material
PiperOrigin-RevId: 414839941
2021-12-08 14:56:25 +00:00
Material Design Team
a487c89185 Internal change
PiperOrigin-RevId: 412135443
2021-11-29 17:35:39 +00:00
jeremymuhia
65754bd152 [CollapsingToolbarLayout][a11y] collapsing toolbar layout not respecting system level bold
PiperOrigin-RevId: 410846065
2021-11-29 16:53:01 +00:00
Riccardo Ciovati
1b8fb30370 [CollapsingToolbarLayout] Allow customizing the title position interpolator
Resolves https://github.com/material-components/material-components-android/pull/1757

GIT_ORIGIN_REV_ID=87dea3a74d8a8f460cc9beb32bcb783f71ee6e63
PiperOrigin-RevId: 401826042
2021-10-11 10:59:08 -04:00
extmkv
9382bb03c3 [CollapsingToolbarLayout] When scrimAnimator already created we must update the duration when calling setScrimAnimationDuration
Resolves https://github.com/material-components/material-components-android/pull/1575

GIT_ORIGIN_REV_ID=7e3f5f99fa650b0282a5338eac254ec71593e795
PiperOrigin-RevId: 394035205
2021-09-01 17:03:15 -04:00
pfthomas
ec3f96cbb9 [CollapsingToolbarLayout] Fix expanded height incorrect after rotation
PiperOrigin-RevId: 391547762
2021-08-18 10:27:05 -07:00
dniz
655dde062a [CollapsingToolbarLayout] Added option to add extra height when title text spans across multiple lines
PiperOrigin-RevId: 382716405
2021-07-02 08:16:09 -04:00
dniz
9ebf1a1387 [CollapsingToolbarLayout] Added option to force always applying system window inset top regardless of layout_height
PiperOrigin-RevId: 382286923
2021-07-01 06:49:33 -07:00
dniz
ae82585b79 [CollapsingToolbarLayout] Added experimental setRtlTextDirectionHeuristicsEnabled() method
PiperOrigin-RevId: 377044268
2021-06-02 16:47:05 -04:00
dniz
5c147722ed [CollapsingToolbarLayout] Added support for expanded and collapsed title text color attributes
PiperOrigin-RevId: 375103699
2021-05-21 14:10:28 -07:00
dniz
841f229592 [CollapsingToolbarLayout] Fixed RTL text only laying out as RTL when actual text is RTL
PiperOrigin-RevId: 374663684
2021-05-19 11:00:25 -07:00
dniz
f0ce498108 [CollapsingToolbarLayout] Added title line spacing and hyphenation frequency setters
PiperOrigin-RevId: 371920600
2021-05-05 09:40:38 -04:00
dniz
be85a92a73 [CollapsingToolbarLayout] Added getLineCount() method
PiperOrigin-RevId: 368630070
2021-04-16 17:48:59 -04:00
Material Design Team
7fc9df5399 Automated g4 rollback of changelist 368429312
PiperOrigin-RevId: 368474895
2021-04-16 12:44:38 -04:00
dniz
2b2c69f773 [CollapsingToolbarLayout] Added getLineCount() method
PiperOrigin-RevId: 368429312
2021-04-16 12:43:47 -04:00
dniz
9c75ad07f7 [CollapsingToolbarLayout] Added support for fade out/in title collapse mode
PiperOrigin-RevId: 365629647
2021-03-30 14:48:19 -04:00
dniz
1f6ebe9e7b [CollapsingToolbarLayout] Fixed Toolbar link errors in javadoc due to androidx vs framework Toolbar support
PiperOrigin-RevId: 360443545
2021-03-03 14:24:34 -05:00
dniz
036cff7c33 [CollapsingToolbarLayout] Updated CollapsingToolbarLayout to support framework android.widget.Toolbar (<Toolbar)
PiperOrigin-RevId: 345236307
2020-12-02 15:04:30 -05:00
dniz
a21a30026a [CollapsingToolbarLayout] Fixed scrolling sibling view bottom cut off issue
There was an issue when navigating back to a fragment with a CollapsingToolbarLayout, where the items at bottom of the CollapsingToolbarLayout's scrolling sibling view were cut off and couldn't be reached by scrolling. It had to do with the minimum height of the CollapsingToolbarLayout not being set at the point when HeaderScrollingViewBehavior calculates the height of the scrolling view in its onMeasureChild() method. The onMeasureChild() method factors in AppBarLayout#getTotalScrollRange which is dependent on the minimum height of the CollapsingToolbarLayout, so moving the CollapsingToolbarLayout's setMinimumHeight() from its onLayout() to its onMeasure() fixes the issue by making the minimum height available earlier.

Resolves https://github.com/material-components/material-components-android/issues/1558
Resolves https://github.com/material-components/material-components-android/issues/846
Resolves https://github.com/material-components/material-components-android/issues/1070
Resolves https://github.com/material-components/material-components-android/issues/1198

PiperOrigin-RevId: 337309314
2020-10-15 13:40:26 -07:00
dniz
a6d788f28e [CollapsingToolbarLayout] Added collapsingToolbarLayoutStyle default theme attribute
PiperOrigin-RevId: 333515330
2020-09-24 09:02:13 -07:00
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
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
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
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
cketcham
cb1674662a Add @NonNull and @Nullable annotations
PiperOrigin-RevId: 264619150
2019-08-26 11:01:22 -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