History log of /frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
952c28b8cf957ff6df921e352385d02b4da285be 15-May-2017 Frantisek Nagy <frantisek.nagy.ml@gmail.com> Fix CoordinatorLayout edge building process.

There was a bug in the way the dependency graph was filled on the first
measure/layout pass. We iterated over all child views and for each child
A we iterated every other child and for each other child B we checked if
B depends on A and if so, we added an edge A->B to the dependency graph.
For anchors, on the first run, each child's LayoutParams only have info
about its anchorId and not the anchor view itself. This is resolved by
calling LayoutParams.findAnchorView(). Until this call, checking
LayoutParams.dependsOn() returns false. In current implementation we
only called findAnchorView() for child A, but then we checked
dependsOn() for child B.

This fixes this issue with inverting the check, so we check if A depends
on B and if it does, we add an edge B->A to the dependency graph.

Bug: 31622224
Test: Added CoordinatorLayoutTest.testAnchorDependencyGraph() test case
that fails without this fix.

Change-Id: Idcdf82031cce02340b2733aad1e30feb6f9359bb
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
c69882cb9b130902c1554ef5d3e3b06d776cd796 05-Mar-2017 Alan Viverette <alanv@google.com> Re-enable lint enforcement, fix remaining lint issues

Bug: 29630077
Test: ./gradlew lint
Change-Id: Ied1e4b1c33ba158d6bfab5439497ee4fc8284a8f
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
b3db61010514ef829b0bd9b17c598138b3c27f73 20-Dec-2016 Yuichi Araki <yaraki@google.com> Fix gravity handling in CoordinatorLayout

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
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
e53397216e013cc251ed82e5645ac8e1e8947603 15-Dec-2016 Chris Banes <chrisbanes@google.com> Stop nested scolling calling onDependentViewChanged

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
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
b2a5b5286d801081c28e6a76ff143ac1c5448f87 01-Dec-2016 Chris Banes <chrisbanes@google.com> resolve merge conflicts of c88a088 to nyc-support-25.1-dev

Change-Id: I22b9f7cfe49e76b97803a7f22b7408282a3ad867
c88a0889137e9caf87d8bd2e825cb9e7599e4eee 01-Dec-2016 Chris Banes <chrisbanes@google.com> Fix dodge rect contains check

Seems that Rect#contains() checks for non-empty
as well as contains. Fix the check so that only
views with non-empty bounds are actually dodged.

Also moved some of the code around so that we
don't do any unnecessary work just to fail fast.

Test: included
BUG: 31528047

Change-Id: I3ee0e0fe87577d02dee22a8ebd8a9e1dc031796e
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
d50f31949492e65ffc49b0ef74bebecdc2dc417e 29-Nov-2016 Chris Banes <chrisbanes@google.com> Revert "Don't dispatch touch events to Behaviors to all views"

This reverts commit 4a5dd898048a920452692c99896ef8782d71e09b.

Change-Id: I9d29930c367d562a60ff173adf53799156d56179
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
4a5dd898048a920452692c99896ef8782d71e09b 28-Nov-2016 Chris Banes <chrisbanes@google.com> Don't dispatch touch events to Behaviors to all views

We should only be dispatching these events to
Behaviors with views which are visibile.

BUG: 33134309
Test: included
Change-Id: I3c9b442dfa00bc6e0fbe1e0ea5969536f988e663
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
ed4cbfed07f596ed7d675e161fea130bfc3e7034 22-Nov-2016 Chris Banes <chrisbanes@google.com> Fix support library tests

Test: fixing tests
Change-Id: Ib5ef1581167905e957317fefad2fe6278918024b
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
829400b80567896e71227641fbdba8da2ad79b91 21-Nov-2016 Chris Banes <chrisbanes@google.com> Don't dispatch nested scroll events to GONE views

Also added a test which tests the basics
of nested scrolling dispatching in CoordinatorLayout.

Test: included
BUG: 32906215
Change-Id: Ie7f736d18d6536aecd0375330efe9acc21e117c3
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
5504bf16938b16c0456a52714d2297062fd7cd8e 09-Nov-2016 Chris Banes <chrisbanes@google.com> Stop measure/layout on GONE views in CoordinatorLayout
am: 5435163672

Change-Id: Ifabc1403aa3d16ce9eeaf79263dec71b5019f76e
5435163672470b5b49eeeeeab37c44ece0148e92 08-Nov-2016 Chris Banes <chrisbanes@google.com> Stop measure/layout on GONE views in CoordinatorLayout

Test: included and passes on 10-24
BUG: 32713682
Change-Id: Ie785fe3f64420850642664a0d7451e1625721127
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
1f308230a8f1266c27bffc37fbbe7780aacc1ebd 07-Oct-2016 Alan Viverette <alanv@google.com> Fix CoordinatorLayout IllegalArgumentException crash am: f42b1d0113 am: 943958d2b3
am: fbeb10907c

Change-Id: Ie3342f649fcbda77f5bcba0b8df2341792fc4c85
f42b1d01133891273cc97ccf37e86e899f7e62b1 06-Oct-2016 Alan Viverette <alanv@google.com> Fix CoordinatorLayout IllegalArgumentException crash

If offsetChildByInset() gets called before the child has been laid out,
we don't have any bounds to work with and we should abort immediately.

Bug: 31528047
Test: CoordinatorLayoutTest#testDodgeInsetBeforeLayout()
Change-Id: I2262a36460f36e6dfffcfaed2da93fcbfdee9ebd
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
42e7d6fafcde7bfe261dd7d8d75ee53ca0cd6790 28-Sep-2016 Aurimas Liutikas <aurimas@google.com> Replace usage of Instrumentation#runOnMainSync with ActivityTestRule#runOnUiThread.

ActivityTestRule#runOnUiThread handles exceptions correctly and thus should be used
in place of Instrumentation#runOnMainSync. This changes most of these use-cases
except for tricky cases.

Bug: 31801302
Test: ran support-design:connectedCheck and support-appcompat:connectedCheck
Change-Id: I70904aef89e6bbc2a3cff1b3be697258d666e316
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
754cb29c50f09a83251dd4bb633ba445b2411adb 27-Sep-2016 Aurimas Liutikas <aurimas@google.com> Switch from deprecated size annotations to new ones.

Switching from android.test.suitebuilder.annotation.*Test
to android.support.test.filters.*Test.

Bug: 30074170
Test: manual - ran small appcompat tests, they still run and pass
Change-Id: Idce58b988c8e1a809f7f5fae67e0e235159d9fc5
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
2f517207503fdffbcf930584a37b4a03392755d6 17-Aug-2016 Chris Banes <chrisbanes@google.com> Fix IOOBE due to internal list being updated from remove

This CL removes all prepareChildren(), leaving
only the one in onMeasure(). This makes the state
more stable since we will only update it within a
layout pass. This also reduces any unnecessary work.

BUG: 30252077
Change-Id: Ibd00a3c3ede1dd654b0ed6d1d8d8d1c8da94e57a
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
3c9fb156e6585049f4e8f7992542aca307f0be13 05-Aug-2016 Chris Banes <chrisbanes@google.com> Speculative fix for exception in CoordinatorLayout.onLayout

Caused by a prepareChildren call in onChildViewRemoved().
If a child is removed in the middle of a layout pass, the
count is wrong and we hit an IndexOutOfBoundsException.

Fixed by removing the prepareChildren call, which also fixes
onDependentViewRemoved() which was broken in
I1283f72c312824ee3ed1fd4b0bb7e7405f38cb2b.

BUG: 30252077

Change-Id: Ifce3178cf69685d519c859c2ebd6402b744204b1
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
6206ad57276146c8f70e939fd40ce9c7b88767f6 15-Jul-2016 Yuichi Araki <yaraki@google.com> Fix inset edge of CoordinatorLayout

Views with multiple dodgeInsetEdges properly dodge all the edges.

Change-Id: I00e62bfb4d3379e4357f1b4bbfd837d9795a5f4f
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
943b6775f5dbe28a8ae509e685cf765937b2a76b 30-Jun-2016 Yuichi Araki <yaraki@google.com> Add layout_insetEdge and layout_dodgeInsetEdges

Add layout_insetEdge and layout_dodgeInsetEdges to CoordinatorLayout.
Views that are marked with layout_insetEdge will inset a CoL's edge.
Views that are marked with layout_dodgeInsetEdges will dodge the
specified inset edges.

The internal implementation of Snackbar-FAB relationship will be
replaced in a coming CL.

Bug: 29417370
Change-Id: Id381d8b6225f3211048dd39fd459e52224af1929
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java
3035e10317eb12c58153d8c651a791896ea3094e 13-Jun-2016 Chris Banes <chrisbanes@google.com> Fix setFitsSystemWindows not working with CoordinatorLayout

This CLs moves some of the logic around so that CoL
responds correctly to setFitsSystemWindows calls.

BUG: 29270333
Change-Id: Id1fd8db914de7c6729c74ec6740d19f538e6fdac
/frameworks/support/design/tests/src/android/support/design/widget/CoordinatorLayoutTest.java