44 Commits

Author SHA1 Message Date
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
marianomartin
164bf0fabd Internal cleanup
PiperOrigin-RevId: 255609320
2019-07-03 14:02:53 -04:00
marianomartin
367b295624 Internal cleanup
PiperOrigin-RevId: 254414602
2019-06-24 17:12:42 -04:00
cketcham
bff75f2d3e Update to lamdas
PiperOrigin-RevId: 252846439
2019-06-18 13:21:02 -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
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
cketcham
dc72aaeed4 Migrate Gradle build and sources to androidx
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
dniz
b4529d2a88 Remove unused MathUtils methods and add documentation. Also replace
MathUtils#constrain with Support Library MathUtils#clamp

PiperOrigin-RevId: 197905324
2018-05-30 17:31:27 -04:00
Material Design Team
9d5f06978b [a11y] Ensure CollapsingToolbarLayout surfaces its custom-rendered title to accessibility services.
PiperOrigin-RevId: 195269779
2018-05-03 14:35:57 -04:00
Material Design Team
0b2eb829de Automated g4 rollback of changelist 195137298
PiperOrigin-RevId: 195163452
2018-05-03 12:53:25 -04:00
Material Design Team
fa28108018 [a11y] When the collapsing title is not null or empty, set the content description as the collapsing title.
PiperOrigin-RevId: 195137298
2018-05-02 17:05:57 -04:00
dniz
9ca33544ac Update package name to com.google.android.material
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00