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
The bottom sheet is no longer marked as clickable.
Bug: 32548431
Test: BottomSheetDialogTest#testTouchInside, #testClickContent
Change-Id: I0870ae90f6f51fd705486f715d7e8e6e970998da
PiperOrigin-RevId: 148385873
Working around what appears to be a platform flakiness
with setTranslationY
Test: ./gradlew support-design:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.design.widget.SnackbarTestWithFAB
Bug: 32439902
Change-Id: Icde0f4ccac57421a158d2b4818654109a5fca6ba
PiperOrigin-RevId: 148373985
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
Many of support library users are still not using AAPT2 so
switch to use res-auto and app namespace for the example snippet.
Bug: 34690787
Test: None
Change-Id: I677cab381cc52803fcb9a5b6bb7a630ec8469a0d
PiperOrigin-RevId: 146978916
Enabling test coverage on the com.android.test project causes Dalvik to be
upset, and is just unnecessary/not useful, so this turns that off.
Also deletes a couple unneeded configuration statements in the test app that I
had missed cleaning up before.
PiperOrigin-RevId: 146975159
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
Currently it builds and runs only with Android emulator for API-level 19, will add support for multiple API levels later down the road.
Modifying the build.gradle file is necessary to speed up builds, pre-dexing is really expensive on clean builds (and CI builds are always clean), so this adds support to disable pre-dexing from the command line: pre-dexing is still enabled by default for faster dev time, but is disabled by command line on CI builds.
GitOrigin-RevId=7875359698fabda287b6cf99417cd195e7887838
PiperOrigin-RevId: 146834456