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
dniz
3637c23078
Dark theme color palette
...
PiperOrigin-RevId: 219143246
2018-11-01 16:05:24 -07:00
dniz
6e6692eb57
Update ActionBar to use new color system
...
PiperOrigin-RevId: 217321401
2018-10-28 18:14:54 -04:00
dniz
ea40a1d406
Update Toolbar to use new color system
...
PiperOrigin-RevId: 216770087
2018-10-11 18:31:53 -04:00
Alex Lockwood
0c9094a1eb
[AppBarLayout] Update AppBarLayout to use the 3-arg view constructor
...
Without this fix, it is impossible for developers to properly make proper use of the `defStyleAttr` view constructor argument.
This PR fixes the bug filed here: https://issuetracker.google.com/issues/117316283
Resolves https://github.com/material-components/material-components-android/pull/212
PiperOrigin-RevId: 216750232
2018-10-11 18:31:34 -04:00
dniz
342627e8fb
Add API to AppBarLayout Behavior to allow for disabling of offsetting
...
This makes it possible to disable the "scrolling" that happens when a scrolling
child has a height of match_parent but doesn't have enough actual content to
fill the screen (e.g., a RecyclerView with less than a few items). A scrolling
child with a height of wrap_content that doesn't fill the screen will already
not be scrolled/translated by the AppBarLayout Behavior.
PiperOrigin-RevId: 216255315
2018-10-11 18:12:39 -04:00
dniz
24a171ab53
Add config method to AppBarLayout to enable overlapping header with scrolling child
...
PiperOrigin-RevId: 215800888
2018-10-11 18:04:39 -04:00
dniz
e853c84767
Fix AppBarLayout liftOnScroll target view caching
...
PiperOrigin-RevId: 214066255
2018-09-28 16:19:17 -04:00
dniz
a313443f9e
Update AppBarLayout liftOnScroll to support nested scrolling targets
...
- Add liftOnScrollTargetViewId attribute to allow client to specify the scrolling view that should be listened to for updating AppBarLayout lifted state.
- Use View#canScrollVertically instead of View#getScrollY to determine lifted state.
PiperOrigin-RevId: 213614055
2018-09-28 14:55:37 -04:00
dniz
6a1d85f08c
Action Bar typography styling
...
PiperOrigin-RevId: 210604964
2018-08-29 11:31:51 -04:00
dniz
498d200f40
Fix Toolbar & ActionBar sizes for large screens
...
PiperOrigin-RevId: 210361782
2018-08-28 16:41:06 -04:00
marianomartin
585e2fede0
Remove constructor comments
...
PiperOrigin-RevId: 209762154
2018-08-28 16:34:43 -04:00
dniz
7cd55d872b
Add Toolbar styles that use themed text appearances based on type scale
...
PiperOrigin-RevId: 202636817
2018-07-02 09:50:23 -04:00
dniz
b30c567719
AppBarLayout expose setLiftable() and setLifted() as a workaround for ListView lift on scroll
...
Example of workaround:
appBarLayout.setLiftable(true);
listView.setOnScrollListener(
new OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
boolean isAtTop = firstVisibleItem == 0 && (view.getChildCount() == 0 || view.getChildAt(0).getTop() == 0);
appBarLayout.setLifted(!isAtTop);
}
});
PiperOrigin-RevId: 202187470
2018-07-02 09:42:27 -04:00
Andhie Wong
e1c8886c6c
[AppBar] appbar_scrolling_view_behavior as public res
...
PiperOrigin-RevId: 201416419
2018-06-20 17:30:59 -04:00
dniz
005a0044c3
Update AppBarLayout liftOnScroll start scroll check to not depend on scrolling
...
view size
This fixes an issue where the app bar would not lift if a bottom margin is
applied to the scrolling view
PiperOrigin-RevId: 201008179
2018-06-20 17:28:13 -04:00
marianomartin
663fd7abff
add res-public files
...
PiperOrigin-RevId: 198567215
2018-05-30 17:42:48 -04: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
dniz
d592999d59
Infer initial lifted state for AppBarLayout lift on scroll. This preserves the app bar's elevation across screen rotations and saving/restoring of instance state.
...
PiperOrigin-RevId: 197754058
2018-05-30 17:19:08 -04:00
dniz
5885d2954d
Fix spacing in AppBarLayout attr comment
...
PiperOrigin-RevId: 197630608
2018-05-30 17:18:48 -04:00
dniz
49b6f396ba
Update AppBarLayout to support lift on scroll behavior
...
PiperOrigin-RevId: 197607028
2018-05-30 17:17:09 -04:00
dcarlsson
da9a170696
Fix typo in AppBarLayout documentation.
...
PiperOrigin-RevId: 195305707
2018-05-03 17:02:55 -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
b504d3fc3d
Set up Gradle task for docs build
...
PiperOrigin-RevId: 194457377
2018-04-30 12:03:20 -04:00
dniz
9ca33544ac
Update package name to com.google.android.material
...
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00