ScrollerCompat can be completely replaced by OverScroller that was
added in API14 which ScrollerCompat wraps.
Bug: 32794064
Test: ./gradlew assemble
Change-Id: Ice79dd122b00e1b3c92dea3a95446ac897135a84
PiperOrigin-RevId: 152204128
We bumped our minSdk to 14 and now most of MotionEventCompat methods and
constants are no longer needed.
Bug: 32794064
Test: ./gradlew assemble assembleAndroidTest
Change-Id: I5fc698fc8243107cd969743b7500163818f8c258
PiperOrigin-RevId: 152201817
Ignore scroll events if mNestedScrollingChildRef is not set yet.
It happens if BottomSheetBehavior view is inflated from a ViewStub for
example, input events can arrive too soon.
bug: https://code.google.com/p/android/issues/detail?id=232646
Test: nullity check, existing unit tests still pass.
Change-Id: I0535a63ed834d64fcbf20dd8b268d109232c5077
PiperOrigin-RevId: 152195381
This commit changes the filters layout to use AppCompat's switch, which looks much nicer on pre-L versions. It also moves filters/ to use paddingStart/End to paddingLeft/Right, because that was only added in API level 17.
PiperOrigin-RevId: 152180875
SmallTests are supposed to complete in <200ms, Medium in <1s, and Large in
<30s.
This CL updates the size of all the SmallTest based on excecution times from
presubmit test runners.
Test: None
Bug: 34854821
Change-Id: Iec73f7b6ef63b27cd3d8b19a8e8c7a9b91ff6729
PiperOrigin-RevId: 152174653
This commit fixes two bugs with VectorDrawable that were causing a crash in pre-L devices. One bug was a simple fix: using app:srcCompat instead of android:src for the FAB's icon. The other bug was more complicated, since it involved a VectorDrawable in a compound drawable. To work around the compatibility issues with this, I wrapped the VectorDrawable in a StateListDrawable and enabled AppCompat's ability to set vector drawables from resources.
PiperOrigin-RevId: 152136061
Modification of findScrollingChild() that only returns a view if
it has nested scrolling enabled (instead of just implementing
NestedScrollingChild). As to prevent an incorrect view being
referrenced, leading to incorrect behavior when scrolling.
Test: added BottomSheetBehaviorTest.testFindScrollingChildEnabled()
that tests that an enabled NestedScrollView contained within a disabled
NestedScrollView parent is returned by findScrollingChild(parent)
Change-Id: I9841db9c67520f858913a5109dc08ffed9e53568
PiperOrigin-RevId: 151889793
Remove code that is no longer needed since minSdk for support library is API
14.
This code collapses FloatingActionButtonImpl, FloatingActionButtonGingerbread
and FloatingActionButtonIcs into one class.
Bug: 32794064
Test: ./gradlew clean assemble still works
Change-Id: Id20c0d1807e08ab11ece63883debe2682cfa815f
PiperOrigin-RevId: 151874300
We can delete the different pre API 11 implementation since now
minSdk for support library is API 14.
Bug: 32794064
Test: ./gradlew clean assemble still works
Change-Id: I6ada8869060539b1a5fd7039a343bad766c5aced
PiperOrigin-RevId: 151872595
Since our minsdk is now 14 we can use support transitions apis directly
from BottomNavigationView.
Bug: 32794064
Test: ./gradlew clean assemble still works
Change-Id: Ic9372da05c7ebba59f9a37926ab81f4138f967a2
PiperOrigin-RevId: 151644244
ValueAnimator can now be used directly given that our minSdk is 14.
Bug: 32794064
Test: ./gradlew clean assemble still works
Change-Id: Ibf0111b104eaea10acf33c8d54a3275fdfa0c1a4
PiperOrigin-RevId: 151641145
First step in moving minSdkVersion to API 14 for design library.
Bug: 32794064
Test: gradlew clean assemble assembleAndroidTest still works
Change-Id: I113834cc6e3c088cdf606a86fe7a35faa192b801
PiperOrigin-RevId: 151608161
The text was illegible - it was showing up dark blue on a dark grey background. A simple tweak to the way text colors were set in the theme fixed this.
PiperOrigin-RevId: 150932983
In ag/1820194 we broke this by moving beginDelayedTransition to after
the layout params and scale are set causing it to no longer animate
the text label.
Bug: 36074994
Test: Unable to come up with good automated test. Tested manually - text labels no longer jump
Change-Id: I6bcc988dfd8b2b38360c68fdb6634fcb60c00a2f
PiperOrigin-RevId: 150134808
If that variable is null, it would crash in the previous line
Bug: 34129526
Test: run a few design lib tests
Change-Id: Ic403d4ccf79899f4d2978856fbb02ffc65de0f3f
PiperOrigin-RevId: 150132347
This also fixes a flaky test where items acquired from the pool were
still attached to their old parent.
Bug: 35422793
Bug: 35395583
Change-Id: I303d49bb4a287856baf997bd85d42fd53131c32b
PiperOrigin-RevId: 150129729
NavigationView was crashing on restoring its states when an action view
outside the screen gets inside the screen by screen orientation change
or similar.
Test: NavigationViewTest#testActionViewState
Bug: 34796332
Change-Id: Id2c150fce4d6cc4695c50d57523243975c4f2ef0
PiperOrigin-RevId: 150128785
Adds an additional listener in for developers that want to discern
between item selection and reselection without tracking the current
selection. This maintains backward compatibility with existing uses
of OnNavigationItemSelectedListener by itself in client code; new
behavior is only observed if an OnNavigationItemReselectedListener is
added.
Bug: 34576220
Test: Modified tests in BottomNavigationViewTest, Updated support-design-demos
Change-Id: Id48cde6395dd73a01ce68e3be1783161229f8939
PiperOrigin-RevId: 150119002
Also fixes a bug where programmatic selection of an item (previously
by calling setChecked(true) on a menu item) does not invoke the
OnNavigationItemSelectedListener and does not animate properly.
Bug: 34627065
Bug: 33002556
Test: Added new tests in BottomNavigationViewTest
Change-Id: I2acbacaedb6cf7a05135ba90137f939b690190da
PiperOrigin-RevId: 150107208
This fixes the issue where the timeout is
not restored when the user swipes up
from the Snackbar.
Test: included (and passing)
BUG: 33931084
Change-Id: I2a10936bed97c0344cc3dac66b908e2733f2ffa0
PiperOrigin-RevId: 149605717
Also includes Ib494e97ee482f6b221ad957518af8b4885e88d89, as the added
test fails pre-M otherwise.
Bug: 34686900
Test: Added new test in TabLayoutTest
Change-Id: I2bdee71d55e8b68377124fc4d8a7b94a01a567ba
PiperOrigin-RevId: 149492933
BottomSheetDialog now collapses the bottom sheet when it is shown,
making it possible to use the same instance more than once after user
swipes it down.
Test: BottomSheetDialogTest#testHideThenShow on 15, 18, 19, and 25
Bug: 34214747
Change-Id: I464625eadb41cf42fdaacafe12e32324c21903cb
PiperOrigin-RevId: 149463377
Currently AppBarLayout scrolls too far. This
CL fixes that.
Test: included
BUG: 33934454
Change-Id: Id835c255dddef3ce4fdedd5a4e18a7bd493c5f9a
PiperOrigin-RevId: 149335184
When a child without behavior or anchor has only one axis specified as
its layout_gravity, CoL was centering the child for the other axis.
Bug: 33655774
Test: CoordinatorLayoutTest#testLayoutChildren on 9, 15, 19, 25
Change-Id: Ie56afa62491251b01355b269c9f4c0d79658da4d
PiperOrigin-RevId: 149329258
I concentrated on the resource leaks rather than
any possible null dereferences.
Test: all pass
Change-Id: I2eab70648068058111b6dc82ba7494a1ff0ecb32
PiperOrigin-RevId: 149157552
Test: all the tests pass, also visual inspection on tablets
Bug: 34186126
Change-Id: I135136563647261cd842e1aec2ae9b78e1ca6901
PiperOrigin-RevId: 149146388
onDependentViewChanged() should only be called if
the dependent view has moved or changed size.
Theres currently a code path where the method
can be called if a nested scroll is in progress.
This CL fixes it by gating the movement bounds
check more widely.
Test: included
BUG: 33655283
Change-Id: I06d34147c4ff6136168b1cfd6568a6fce336566e
PiperOrigin-RevId: 149068329
Since we use a SLA now to control elevation
changes, we've hit the issue where draw dispatching
is skipped before the Activity transition finishes
on API 21-23 devices.
This results in the SLA running, but visually you see a
jump in elevation after the activity animation has
finished (and draw commences). To combat this, we now
jump the elevation change in layout.
Test: manual (impossible to automate it)
BUG: 29598367
Change-Id: Ia4f1c2168d363297b7e94ca9f4a0113e4f8ab271
PiperOrigin-RevId: 148950143
- Not restoring elevation
- Not restoring on min-height with status bar insets
- Not restoring when expanded="true" set in layout
Test: included
BUG: 33471543
BUG: 33510949
BUG: 33511540
Change-Id: I43b2afeaf1c2cebf0a87045314830064554e2c5d
PiperOrigin-RevId: 148701728
BottomSheetBehavior#checkSetState was stuck in settling state if the
peek height is as tall as the expanded state.
Test: BottomSheetBehaviorTest#testExpandedPeekHeight
Bug: 31756143
Change-Id: I6e3c4145d545d799b028e5f4fb0ff205f4ec1d0f
PiperOrigin-RevId: 148686097
Got a report that OnClickListeners we not working
in 25.1. Wrote this test to confirm that they are
working fine (which they are).
Test: wallah
Change-Id: I684188e1de8389bca9b27c3a2c78de6bc1e2c6b0
PiperOrigin-RevId: 148668701
It was deprecated in 24.1.0 so it is long
due to be removed.
Test: compiled
BUG: 30110671
Change-Id: I95ca0cb691fd78fc7cca1ff65079f2a964f94e46
PiperOrigin-RevId: 148491907