History log of /frameworks/support/design/src/android/support/design/widget/Snackbar.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
22f13fd48fb232a9a29b43dc2e11dfaeef121ca3 18-Jan-2017 Chris Banes <chrisbanes@google.com> Fix some issues caught via a static analyzer
am: f83358389f

Change-Id: I75ae8adf22fe2383c554b6416e6a8ba2329885cb
1197ecfe52db364deb52022f1496d003aaa938d3 10-Jan-2017 Kirill Grouchnikov <kirillg@google.com> Remeasure snackbar inner layout if it's MATCH_PARENT in width

Test: all the tests pass, also visual inspection on tablets
Bug: 34186126
Change-Id: I135136563647261cd842e1aec2ae9b78e1ca6901
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
f83358389f0c4ea37a7e7d9e493857f99baf0440 07-Jan-2017 Chris Banes <chrisbanes@google.com> Fix some issues caught via a static analyzer

I concentrated on the resource leaks rather than
any possible null dereferences.

Test: all pass
Change-Id: I2eab70648068058111b6dc82ba7494a1ff0ecb32
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
ca9c74379e9fb2b38965253836a2ab0e36990c45 29-Nov-2016 Kirill Grouchnikov <kirillg@google.com> Move the now-deprecated setCallback to Snackbar

This is where it was originally, and this is where it remains
for backwards-compatibility reasons. Also fix broken tests.

Test: run tests in SnackbarTest
Bug: 33192595
Change-Id: I644c03b6a284d7f7177916347c07fc30558e08b8
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
77d397d533d04dfec663939692f2e048a072ee5b 23-Nov-2016 Alan Viverette <alanv@google.com> Perform API backwards compatibility check as part of support checkApi

Works around Doclava API check limitations in Snackbar and v17 classes.
Removes @removed code. Restores GuidedActionsStylelist API that was
removed without prior deprecation.

Bug: 30434567
Change-Id: I58c8a869f4e620d2aca8765a73105c95c185c791
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
8e10080c914d1ad0784394fa3026b85535535847 18-Nov-2016 Aurimas Liutikas <aurimas@google.com> Move from GROUP_ID to LIBRARY_GROUP annotations

- GROUP_ID was deprecated in favor of LIBRARY_GROUP.
- Fix import order in touched files.

Test: ./gradlew assemble assembleAndroidTest
Change-Id: I2a774e93215090f42262fb86cf8e841f2a546a4f
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
8da7b24b08afba7ec155a371117df018bcc25eef 26-Sep-2016 Kirill Grouchnikov <kirillg@google.com> Support custom views on snackbars

Split the existing Snackbar class into two - the base class
with the common functionality for the lifecycle management
and action, and the extending class that "adds" a text message.

The extending class maintains the existing API surface.

This CL has sample code for a custom snackbar in SupportDesignDemo,
as well as unit tests in CustomSnackbarTest class.

Bug: 31658766
Test: ./gradlew support-design:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.design.widget.SnackbarTest
Test: ./gradlew support-design:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.design.widget.CustomSnackbarTest
Test: ./gradlew support-design-demos:assembleDebug; adb install -d -r ../../out/host/gradle/frameworks/support/support-design-demos/build/outputs/apk/support-design-demos-debug.apk
Change-Id: Ic042ad84f56645b48ad6a4d46e22a8e9352f5268
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
c39d9c75590eca86a5e7e32a8824ba04a0d42e9b 25-Aug-2016 Alan Viverette <alanv@google.com> Add @RestrictTo(GROUP_ID) annotations to match @hide docs annotations

Also removes some unnecessary @hide annotations on classes that wouldn't
have shown up in docs anyway due to package/private visibility or NO_DOCS.

Bug: 27937193
Change-Id: Iab127a5a3ce57a2d61965d3cef782621eb3859f5
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
657ea1100fee4750f148f9d0dcb7e7e2028f105e 25-Aug-2016 Aurimas Liutikas <aurimas@google.com> Remove all the extra accessor methods added by javac in support-design.

Change private methods to be package protected to avoid extra methods
that get added to be able to access them from inner classes.

This CL saves 138 methods in our jar.

Bug: 31075707
Change-Id: I9ee192652fe005957e28ccfe35c9707be242aac1
/frameworks/support/design/src/android/support/design/widget/Snackbar.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/src/android/support/design/widget/Snackbar.java
26c07a84cf70ddf44516f7009fe4ce3b5ed65513 13-Jul-2016 Chris Banes <chrisbanes@google.com> Improve CoordinatorLayout's inset edge funtionality

Currently the gravity handling only supports literal
single gravity values which makes it less useful.

Also made the edge detection work with animations by
correctly employing our pre-draw listener.

Tidied up some of the dispatch code in CoordinatorLayout
so that we have just one method which dispatches any
events. Means that we don't have to copy code everywhere.

Also added support for the functionality in Snackbar
and FloatingActionButton since that is what most people
will be trying to use it with. Removed our old baked in
functionality from FAB since we can use the new
CoordinatorLayout functionality.

BUG: 30107168

Change-Id: Ib23fa740c4c4f4f733a3894ceb2cc1a2e95b35cd
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
27705d3451499dd8498effd111f1f4c7df917d87 22-Jun-2016 Chris Banes <chrisbanes@google.com> Make Snackbar work with translucent navigation bars

Also fixed an issue in ViewCompat.setOnApplyWindowInsetsListener
which makes it NPE when given a null listener.

BUG: 29075380
Change-Id: I9c91437a33eee99326f2bbfe9719667f598e005a
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
12113fa03c02662190617538e3e11d7aaa705654 21-Mar-2016 Chris Banes <chrisbanes@google.com> Merge "Disable Snackbar animations if necessary" into mnc-ub-dev
am: 3b591d5

* commit '3b591d566e2242881b149bc43d60dc4cbd374392':
Disable Snackbar animations if necessary
c6cfc5e717bb9c12c6a789a2dcd2badb90c80ed6 21-Mar-2016 Chris Banes <chrisbanes@google.com> Disable Snackbar animations if necessary

Snackbar's animations do not play nicely with
Talkback so this CL disables any animations if
an accessibility manager is enabled.

BUG: 23097365
Change-Id: Id7984784b8a281790e14286af132e51d49ac337e
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
0cfebf096d09aa7bbdd4cf959c6b42c7c601ff95 09-Feb-2016 Chris Banes <chrisbanes@google.com> Merge "Fix Snackbar not showing after a dismissal" into mnc-ub-dev am: eb102d7146
am: 0b48018c02

* commit '0b48018c02db2cb76ba45c91aa7e8082cf73fab0':
Fix Snackbar not showing after a dismissal
819bbaf04bba63abc7b329a14c92af52515aae0a 08-Feb-2016 Chris Banes <chrisbanes@google.com> Fix Snackbar not showing after a dismissal

Caused by us only dipatching a layout change callback
if 'changed' == true. That won't always be true though
if the layout's contents have changed.

The functionality is ambigiuous in that we have
never documented it, but it's simple enough to support.

BUG: 27064954
Change-Id: I517ebde0ed89a2bddf04aef15535baf1e70b1aa4
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
681f964d3315b6aa7af4cc43064dd570bf7dd02c 28-Jan-2016 Chris Banes <chrisbanes@google.com> resolve merge conflicts of 7b0d039842 to master.

Change-Id: I6068e0312018955a1bc73129f0b289991a385ea0
a89b7a8e4840e52dfda1442bcb885686680556f6 26-Jan-2016 Chris Banes <chrisbanes@google.com> Fix Snackbar swipe to dismiss not working pre-v11

Multiple issues:
- offsetTopAndBottom doesn't invalidate pre-v11, so
ViewDragHelper now uses the ViewCompat version.
- ViewCompat's offset method needs to invalidate the parent
instead, since the view has moved and thus the dirty rect
is larger than the view's bounds.
- Fixed issue in Snackbar which meant that the view would
not be removed after a swipe settle.

BUG: 26768803
Change-Id: Ia9abc4884f8ffd05408135d3fc4dd1b073392a7b
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
669e3afeade265e0411d8eb10483410556677a5d 20-Jan-2016 Chris Banes <chrisbanes@google.com> Merge "Accessibility fix for Snackbar announcements" into mnc-ub-dev am: 804aa1e7d8
am: 61e07fb8e6

* commit '61e07fb8e6843e7d7d293eb2ca674333f0a3e600':
Accessibility fix for Snackbar announcements
ed149aee7e5d78a9b5714e7b7b1cc394ca9e4af3 18-Jan-2016 Chris Banes <chrisbanes@google.com> Accessibility fix for Snackbar announcements

Allows it to properly announce itself when shown/hidden.
Was broken by a fade animation on the Snackbar's child
views, making Talkback think they were not visible.

Also made Snackbar important for accessibility, for devices
running pre-v19.

BUG: 23097365

Change-Id: I57c6c7ecb70661c7c04e0923ad9df2eaa3a360af
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
424d9b914f459ad48631d7762c4e133f11f45c34 14-Jan-2016 Chris Banes <chrisbanes@google.com> Merge "Fix Snackbar tests when animations are enabled" into mnc-ub-dev am: 5b5ab38cdf
am: 120b623fd2

* commit '120b623fd24e5ebb94b7059d514d4ae8bb0a7600':
Fix Snackbar tests when animations are enabled
df00f11c8c90db7b26672267fd1b74250c0d6cef 13-Jan-2016 Chris Banes <chrisbanes@google.com> Fix Snackbar tests when animations are enabled

Change-Id: If75f17ab09fe4b1a72b3bcc9ba29d90a8eb85972
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
0595eabfc590375a245f4622716290d3dac8fa01 07-Jan-2016 Chris Banes <chrisbanes@google.com> Merge "Fix Snackbar callback being called twice on API 14/15" into mnc-ub-dev am: 9264b12f53
am: 32aeb4fbee

* commit '32aeb4fbee8e7dc0cd5424d9e64e068e897e5281':
Fix Snackbar callback being called twice on API 14/15
bfd48d0521963754e04e407499ee9e278fe06c0f 06-Jan-2016 Chris Banes <chrisbanes@google.com> Fix Snackbar callback being called twice on API 14/15

BUG: 25072545
Change-Id: I589af3896c4c13f1cb2768e3fea95cd2f7a72365
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
905a69d74072bec5916afb51f1571288188bad3a 20-Oct-2015 Chris Banes <chrisbanes@google.com> Merge "Fix Snackbar dismisal generating two callbacks" into mnc-ub-dev am: f39b7e593c
am: 28c10e8f9b

* commit '28c10e8f9b80424f148dd43e2ebea4182f780300':
Fix Snackbar dismisal generating two callbacks
eeea73a484fe384e6a8059e45db369cea7c247f6 19-Oct-2015 Chris Banes <chrisbanes@google.com> Fix Snackbar dismisal generating two callbacks

Caused by a call ordering issue when the
SnackbarLayout is removed from it's parent.

BUG: 25072545
Change-Id: I0c264f570e8a010574aa0fe7690bd58c51967f5e
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
9d6eb9beafef317f0f1bc5596ab47114c161f41a 19-Oct-2015 Chris Banes <chrisbanes@google.com> am e274607c: am cae51694: Merge "Ensure that SwipeDismissBehavior affects the correct view" into mnc-ub-dev

* commit 'e274607cdee3deb8f2f15a6bbdaf6051dd6fa6bc':
Ensure that SwipeDismissBehavior affects the correct view
02751b16719af2e3f8212f93c001da1b0566b1b5 15-Oct-2015 Chris Banes <chrisbanes@google.com> Ensure that SwipeDismissBehavior affects the correct view

Can cause weirdness if there are views in the same location
as the Snackbar when it's being dragged. We now have a
callback in SwipeDismissBehavior to allow behaviors
to control which views can be dragged.

BUG: 24956960
BUG: 23756487
Change-Id: Idf82de127597eba3a543f99ffc2a088fbc9d3af0
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
347536e8c751179028aa926e48e3e55d038fd37d 25-Sep-2015 Chris Banes <chrisbanes@google.com> am 7e8afaf9: am e25a0992: Merge "Accessibility improvements for design lib" into mnc-ub-dev

* commit '7e8afaf9471d2ae988ae82b0d4093a4f82abf4ea':
Accessibility improvements for design lib
3224093af46bac6f2fd5b372d5fbd56429b811c1 23-Sep-2015 Chris Banes <chrisbanes@google.com> Accessibility improvements for design lib

Set live regions on Snackbar, TextInputLayout's error
and counter views.

BUG: 22988138
Change-Id: Iaf4ddd80b70b2467ee024562ba0dbf9a6ca9a5c0
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
19551f09a5ebc02a0a4ce16984ec9e8023954bc1 24-Sep-2015 Chris Banes <chrisbanes@google.com> am d2fe3395: am 3480b31f: Merge "Fix Snackbar#show() not working after rotation" into mnc-ub-dev

* commit 'd2fe3395d5e2dc86f394ae244ff2566a8629e91c':
Fix Snackbar#show() not working after rotation
5462d3e588481416a38e893bdb0f1073f82f8dcc 21-Sep-2015 Chris Banes <chrisbanes@google.com> Fix Snackbar#show() not working after rotation

Caused by us not handling the window detach
event, and thus not updating our state to reflect
the fact.

BUG: 24256478
Change-Id: Ie0065dedd27fefd202cc1f6bcf8016809bf32eae
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
65fb4571ce472e3ea5d654f51025bb84925f5b22 07-Aug-2015 Chris Banes <chrisbanes@google.com> am 2dd67ac0: am 8c6f2081: Merge "Add more helpful exception to design components" into mnc-ub-dev

* commit '2dd67ac062eb7f7a9a83e4f864eb27b15f416f48':
Add more helpful exception to design components
809bb62055ad42b88f3a69308be222801b89fbd9 07-Aug-2015 Chris Banes <chrisbanes@google.com> Add more helpful exception to design components

If a developer doesn't use a AppCompat theme, bad
things happen with the design lib. This CL adds
an explicit check with a helpful error message.

Change-Id: I60c81ed87057fa75b38e26bf8c4b1edbc9ff7a3f
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
956cef01684faf7946de5f0fd7b6709e27529a3b 03-Aug-2015 Tor Norbye <tnorbye@google.com> Merge "Allow integers to both have @IntDef and @IntRange constraints"
de0cc188c28f8c19ef5e737e9cd22492b07250c8 01-Aug-2015 Tor Norbye <tnorbye@google.com> Allow integers to both have @IntDef and @IntRange constraints

Used to fix
181789: Incorrect/inconsistent lint + documentation for Snackbar

Change-Id: I12b68ed8dc0ff5e7c14857177af0c621c9ce5bc0
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
e51e533995e445f031fc8efcce6ff9a61e7066cc 20-Jul-2015 Chris Banes <chrisbanes@google.com> API tidy up for Snackbar

Made setCallback() return itself for chaining
Add an event type to the dismiss callback
Annotated more of the methods
Tightened up the class' visiblity

Change-Id: I63935be331ec39dce6483fd478f1dd14498c3cd9
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
5bb1f5d910c81ed2a31c687583bd90baccc972ac 07-Jul-2015 Chris Banes <chrisbanes@google.com> Annotate Snackbar correctly

BUG: 22313082
Change-Id: I90cd0a5f07d2a38ea0c310a3f5c5252251cb5a98
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
5cf1a7e04097b7e116c118cfa823a4cdb48f38a1 06-Jul-2015 Chris Banes <chrisbanes@google.com> Use Button for Snackbar's action

Makes the action focusable for accessbility
purposes, and allows us to use the normal
borderless button style.

Change-Id: Ic94dac43434f0bddca19eb6fcea36ce6913460f5
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
a577676a64e5353b8ec927117151aa6be84adf66 23-Jun-2015 Chris Banes <chrisbanes@google.com> Prefix design lib resources to try and avoid conflicts

BUG: 21363917
Change-Id: I770a01618ac8fefae6d82d1640ccf313111e38e8
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
0bfb0e034ed6b4f7bbf58a111d2fc893e0553350 12-Jun-2015 Chris Banes <chrisbanes@google.com> Add LENGTH_INDEFINITE to Snackbar

BUG: 21802300

Change-Id: Id7b519b0ea08760dea12d1f1b1bb3fcf202b4c6e
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
bfae5eb86f8c5e63b33b6d36073f2230599a716b 01-Jun-2015 Chris Banes <chrisbanes@google.com> Add a Callback to Snackbar

BUG: 21553485
Change-Id: I465ec53a7479979da0dbe464913658e1d1bf3b63
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
4112c61626e5a6107c5874c28829b76bb9fc9f17 18-May-2015 Chris Banes <chrisbanes@google.com> Allow setting of a Snackbar's action text color

BUG: 21195688
Change-Id: Id5f2e69746b2c42e7ba7aabb1a8070083e2bd077
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
c482f89070ee5032081e394f77a9a1e63c3cd7a8 18-Apr-2015 Chris Banes <chrisbanes@google.com> Snackbar fixes

- Fix possible memory leak
- Crawl up the view hierarcy to find a parent
Allows a Snackbar to bubble up to a root CoL if
it exists, otherwise we just use the content view

Change-Id: I4e17a7522835366047824fa30844748062c8e965
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
3a2c9c408e240e761b043139c5d228d3ad93f6c2 26-Mar-2015 Chris Banes <chrisbanes@google.com> Add app:menu attribute to NavigationView

Also refactored some of the navigation view internals.

BUG: 19938713
Change-Id: I046761c2c41490fd28b984c035672add77ea9c7a
/frameworks/support/design/src/android/support/design/widget/Snackbar.java
b7f9224b1495db47eb8fd813b5912250e900770a 09-Jan-2015 Chris Banes <chrisbanes@google.com> Snackbar

Also added a new default swipe-to-dismiss behavior
and hooked it up. Also hooked up the Snackbar
to the Floating Action Buttons.

Change-Id: I717d4db5d34b6c17a2afabe5a3bc2c79fcee4233
/frameworks/support/design/src/android/support/design/widget/Snackbar.java