These are the foundation for the back layer functionality. The behavior
does the heavy lifting to measure the adjacent content view.
As of now this only lays out the views correctly in the hidden state, it doesn't support exposing the back layer at all, yet. Full of TODOs, this is just a skeleton.
PiperOrigin-RevId: 156334640
- AppBarWithCollapsingToolbarStateRestoreTest needed a variable used inside a closure to be marked as final (No idea why Bazel was okay with this)
- BottomNavigationViewTest/TabLayoutTest needed TargetApi annotations for tests that run on N+
- Every Shrine build.gradle file needs to specify values for Java includes and srcDirs, regardless of whether they contain Java. If they don't they get the default library values (which includes every subdirectory recursively), and result in duplicate classes being generated.
- Various styles.xml files in Shrine were using attributes only available in v17 or v21+
This also updates the main build.gradle file to print lint errors on stdout, so they're easier to look at in TravisCI.
PiperOrigin-RevId: 153389041
If there is a top window inset we need to make sure
that we expand our height to allow the Toolbar
to be offset.
BUG: 36126318
Test: included
Change-Id: I179fc6764166d80d92a8a995c93d54650365c2bf
PiperOrigin-RevId: 152452065
Bug: 30701044
Test: I was unable to repro this locally, but this should fix the flakiness
Change-Id: I58b143c5aeec13941b28bac6136f28215a8efbab
PiperOrigin-RevId: 152432632
AppBarWithCollapsingToolbarStateRestoreTest has been rotating the activity
without rotating it back causing tests that follow it to flake due to
unexpected
orientation change back to original orientation.
Bug: 36130096
Test: Test still passes locally
Change-Id: I642a72d8a90ae5c16df4ef3710a4fd3057bd3043
PiperOrigin-RevId: 152411001
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
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
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
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
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
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
- 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
The bottom sheet is no longer marked as clickable.
Bug: 32548431
Test: BottomSheetDialogTest#testTouchInside, #testClickContent
Change-Id: I0870ae90f6f51fd705486f715d7e8e6e970998da
PiperOrigin-RevId: 148385873
Otherwise the tests are flaky.
Test: run TabLayoutWithViewPagerTest
Bug: 32777434
Change-Id: I89df311b2d20b4e4e30f8b85db997cace50f3f99
PiperOrigin-RevId: 148288601
Test: Newly added test and sample app for the original repro step.
AOSP bug: https://code.google.com/p/android/issues/detail?id=232407
Bug: 34767250
Change-Id: Ia216bf1177a55a139f8988d995836c1d42c496ee
PiperOrigin-RevId: 147116504
Happens when the EditText is populated with
text from the layout, etc. Caused by some
state being set wrong in the constructor,
which makes the proceeding state update
no-op, since it thinks it is already in the
state.
BUG: 33585556
Test: included
Change-Id: I34c6e9aca3c41f864974ad32fcdbb6dc829645b8
PiperOrigin-RevId: 147067802
Bazel wants a structure where the application used for testing and the tests themselves are in separate packages (which gradle is less picky about). Android has a gradle plugin for this setup (com.android.test), although it unfortunately has seemingly worse Android Studio support at this point. In any case, this change splits the code up a bit more, into 3 parts:
- lib: the files we actually distribute as a library to end users
- testing: the test application and its custom component subclasses that are tested by the emulator tests
- tests: the actual emulator test code
The structure is a tad strange for typical gradle projects (testing in particular, which has a build.gradle file for each individual Java package, at the same level as the actual source files), but it better matches the conventions of bazel while also avoiding the need for a ton of parallel directory structures at the top level.
Known issues as of this commit:
- Android Studio doesn't think the Java files in testing/ have the right package. I tried to fix this by bumping their java srcDir up to the java/ root and changing the includes, but Android studio seems unable to properly figure that out and instead acted like the Java files didn't exist at all, so I reverted that. We can possibly modify the iml files that get generated, but I'll save this for a follow-up commit since this is already very large.
- Android Studio seems unable to run emulator tests properly (but they work from the command-line). I don't quite know why they fail, but seems like lacking support for the com.android.test plugin. Hopefully this is something we can work around for find a fix for in the near future.
PiperOrigin-RevId: 146940681
This new structure will allow for a top-level gradle file and a multi-project
build (which is a more typical structure for things). In the future, it will
allow us to place other projects in here as well (such as sample applications).
PiperOrigin-RevId: 141247594
* changes:
Start using return value of OnNavigationItemSelectedListener.
Clean up BottomBar docs
Force BottomNavigationView item labels to be singleLine.
Clean-up BottomNavigationMenuView#onMeasure and other style fixes.
GitOrigin-RevId=c4037564222e361cb92bbc05a062f8da91be5f5f
PiperOrigin-RevId: 140564780