/frameworks/support/design/tests/src/android/support/design/widget/ |
SnackbarTest.java | 53 void dismiss(Snackbar snackbar); 66 private void verifySnackbarContent(final Snackbar snackbar, final String expectedMessage, 68 // Show the snackbar 69 SnackbarUtils.showSnackbarAndWaitUntilFullyShown(snackbar); 73 isDescendantOfA(isAssignableFrom(Snackbar.SnackbarLayout.class)), 79 isDescendantOfA(isAssignableFrom(Snackbar.SnackbarLayout.class)), 83 // Dismiss the snackbar 84 SnackbarUtils.dismissSnackbarAndWaitUntilFullyDismissed(snackbar); 129 final Snackbar snackbar = Snackbar.make(mCoordinatorLayout, MESSAGE_TEXT, length) local 257 final Snackbar snackbar = local [all...] |
SnackbarTestWithFAB.java | 52 // Show a simple Snackbar and wait for it to be shown 53 final Snackbar snackbar = Snackbar.make(mCoordinatorLayout, MESSAGE_TEXT, local 54 Snackbar.LENGTH_SHORT); 55 SnackbarUtils.showSnackbarAndWaitUntilFullyShown(snackbar); 57 // Now check that the FAB has shifted up to make space for the Snackbar 61 assertEquals(originalFabPosition[1] - snackbar.getView().getHeight(), fabPosition[1]); 63 // Now wait until the Snackbar has been dismissed 64 SnackbarUtils.waitUntilFullyDismissed(snackbar); 79 final Snackbar snackbar = Snackbar.make(mCoordinatorLayout, MESSAGE_TEXT, local [all...] |
SnackbarTestWithTranslucentNavBar.java | 53 // Show a simple Snackbar and wait for it to be shown 54 final Snackbar snackbar = Snackbar.make(mCoordinatorLayout, MESSAGE_TEXT, local 55 Snackbar.LENGTH_SHORT); 56 SnackbarUtils.showSnackbarAndWaitUntilFullyShown(snackbar); 61 // Check that the Snackbar view has padding set to display above the nav bar 62 final View view = snackbar.getView();
|
CoordinatorSnackbarWithFabTest.java | 46 private Snackbar mSnackbar; 50 // Dismiss the snackbar to get back to clean state for the next test 57 * Returns the location of our snackbar on the screen. 61 onView(isAssignableFrom(Snackbar.SnackbarLayout.class)).perform(new ViewAction() { 69 return "Snackbar matcher"; 81 * Helper method that verifies that the passed view is above the snackbar in the activity 86 // Get location of snackbar in window 95 // and verify that our view is above the snackbar 105 // Create and show a snackbar 106 mSnackbar = Snackbar.make(mCoordinatorLayout, MESSAGE_TEXT, Snackbar.LENGTH_INDEFINITE [all...] |
/frameworks/support/samples/SupportDesignDemos/src/com/example/android/support/design/widget/ |
SnackbarUsage.java | 22 import android.support.design.widget.Snackbar; 48 Snackbar.make(mContentView, "Short snackbar message", Snackbar.LENGTH_SHORT).show(); 52 Snackbar.make(mContentView, "Short snackbar message", Snackbar.LENGTH_SHORT) 56 Toast.makeText(SnackbarUsage.this, "Snackbar Action pressed", 63 Snackbar.make(mContentView, "Long snackbar message which wraps onto another line and [all...] |
SnackbarWithFloatingActionButton.java | 22 import android.support.design.widget.Snackbar; 28 * This demonstrates idiomatic usage of Snackbar with a Floating Action Button present
|
/packages/apps/Messaging/src/com/android/messaging/ui/ |
SnackBarManager.java | 39 import com.android.messaging.ui.SnackBar.Placement; 40 import com.android.messaging.ui.SnackBar.SnackBarListener; 76 // Dismiss the {@link SnackBar} but don't consume the event. 92 private SnackBar mCurrentSnackBar; 93 private SnackBar mLatestSnackBar; 94 private SnackBar mNextSnackBar; 104 public SnackBar getLatestSnackBar() { 108 public SnackBar.Builder newBuilder(final View parentView) { 109 return new SnackBar.Builder(this, parentView); 113 * The given snackBar is not guaranteed to be shown. If the previous snackBar is animating away [all...] |
SnackBarInteraction.java | 25 * An interface that defines how a component can be animated with an {@link SnackBar}. 29 * Returns the animator that will be run in reaction to the given SnackBar being shown. 31 * Implementations may return null here if it determines that the given SnackBar does not need 34 ViewPropertyAnimator animateOnSnackBarShow(SnackBar snackBar); 37 * Returns the animator that will be run in reaction to the given SnackBar being dismissed. 39 * Implementations may return null here if it determines that the given SnackBar does not need 42 ViewPropertyAnimator animateOnSnackBarDismiss(SnackBar snackBar); 46 * {@link SnackBar} is always shown with {@link Gravity#BOTTOM} and that the provided View wil [all...] |
/frameworks/support/design/tests/src/android/support/design/testutils/ |
SnackbarUtils.java | 19 import android.support.design.widget.Snackbar; 32 private static class SnackbarShownCallback extends Snackbar.Callback 48 return "Snackbar shown callback"; 61 public void onShown(Snackbar snackbar) { 69 private static class SnackbarDismissedCallback extends Snackbar.Callback 85 return "Snackbar dismissed callback"; 98 public void onDismissed(Snackbar snackbar, @DismissEvent int event) { 107 * Helper method that shows that specified {@link Snackbar} and waits unti [all...] |
/packages/apps/DeskClock/src/com/android/deskclock/widget/toast/ |
SnackbarManager.java | 19 import android.support.design.widget.Snackbar; 24 * Manages visibility of Snackbar and allow preemptively dismiss current Snackbar on screen. 28 private static WeakReference<Snackbar> sSnackbar = null; 32 public static void show(Snackbar snackbar) { 33 sSnackbar = new WeakReference<>(snackbar); 34 snackbar.show();
|
LinearLayoutWithSnackbarBehavior.java | 21 import android.support.design.widget.Snackbar; 27 * LinearLayout Behavior that slides up and down when snackbar appears/disappears. 36 return dependency instanceof Snackbar.SnackbarLayout;
|
/frameworks/base/docs/html/training/snackbar/ |
action.jd | 2 page.tags="Snackbar" "action" "popup" 36 You can add an action to a {@link android.support.design.widget.Snackbar}, 38 {@link android.support.design.widget.Snackbar}, the 39 {@link android.support.design.widget.Snackbar} puts a button 46 <img src="{@docRoot}images/training/snackbar/snackbar_undo_action_2x.png" 47 srcset="{@docRoot}images/training/snackbar/snackbar_undo_action.png 1x, 48 {@docRoot}images/training/snackbar/snackbar_undo_action_2x.png 2x" 52 <strong>Figure 1.</strong> This Snackbar has an <strong>Undo</strong> 57 To add an action to a {@link android.support.design.widget.Snackbar} message, 76 {@link android.support.design.widget.Snackbar#setAction(int, android.view.View.OnClickListener [all...] |
showing.jd | 2 page.tags="Snackbar" "popup" "pop-up" 28 You can use a {@link android.support.design.widget.Snackbar} to display a brief 30 period. A {@link android.support.design.widget.Snackbar} is ideal 33 android.support.design.widget.Snackbar} to tell the user that the app 40 A {@link android.support.design.widget.Snackbar} is attached to a view. The 41 {@link android.support.design.widget.Snackbar} provides basic functionality 44 {@link android.support.design.widget.Snackbar} 46 {@link android.support.design.widget.Snackbar} gains additional features: 50 <li>The user can dismiss the {@link android.support.design.widget.Snackbar} 55 android.support.design.widget.Snackbar} appears. For example, if the layou [all...] |
index.jd | 2 page.tags="Snackbar","Toast" 41 Android provides the {@link android.support.design.widget.Snackbar} widget 43 A {@link android.support.design.widget.Snackbar} provides a quick pop-up 45 while the {@link android.support.design.widget.Snackbar} is displayed. After a 46 short time, the Snackbar automatically dismisses itself. 51 android.support.design.widget.Snackbar} to show pop-up messages. 55 <img src="{@docRoot}images/training/snackbar/snackbar_drive_2x.png" 56 srcset="{@docRoot}images/training/snackbar/snackbar_drive.png 1x, 57 {@docRoot}images/training/snackbar/snackbar_drive_2x.png 2x" 60 <strong>Figure 1.</strong> A {@link android.support.design.widget.Snackbar} [all...] |
/frameworks/support/design/src/android/support/design/widget/ |
Snackbar.java | 69 * To be notified when a snackbar has been shown or dismissed, you can provide a {@link Callback} 72 public final class Snackbar { 75 * Callback class for {@link Snackbar} instances. 77 * @see Snackbar#setCallback(Callback) 80 /** Indicates that the Snackbar was dismissed via a swipe.*/ 82 /** Indicates that the Snackbar was dismissed via an action click.*/ 84 /** Indicates that the Snackbar was dismissed via a timeout.*/ 86 /** Indicates that the Snackbar was dismissed via a call to {@link #dismiss()}.*/ 88 /** Indicates that the Snackbar was dismissed from a new Snackbar being shown.* 220 Snackbar snackbar = new Snackbar(findSuitableParent(view)); local [all...] |
SnackbarManager.java | 26 * Manages {@link Snackbar}s. 76 // If this is the Snackbar currently being shown, call re-schedule it's 90 Snackbar.Callback.DISMISS_EVENT_CONSECUTIVE)) { 91 // If we currently have a Snackbar, try and cancel it and wait in line 94 // Clear out the current snackbar 113 * Should be called when a Snackbar is no longer displayed. This is after any exit 119 // If the callback is from a Snackbar currently show, remove it and show a new one 129 * Should be called when a Snackbar is being shown. This is after any entrance animation has 191 // The callback doesn't exist any more, clear out the Snackbar 217 if (r.duration == Snackbar.LENGTH_INDEFINITE) [all...] |
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/ |
Snackbars.java | 20 import android.support.design.widget.Snackbar; 26 public static final Snackbar makeSnackbar(Activity activity, int messageId, int duration) { 31 public static final Snackbar makeSnackbar( 34 return Snackbar.make(view, message, duration);
|
/developers/build/prebuilts/gradle/RuntimePermissionsBasic/Application/src/main/java/com/example/android/basicpermissions/ |
MainActivity.java | 27 import android.support.design.widget.Snackbar; 86 Snackbar.make(mLayout, "Camera permission was granted. Starting preview.", 87 Snackbar.LENGTH_SHORT) 92 Snackbar.make(mLayout, "Camera permission request was denied.", 93 Snackbar.LENGTH_SHORT) 106 Snackbar.make(mLayout, 108 Snackbar.LENGTH_SHORT).show(); 120 * a SnackBar that includes additional information. 128 // Display a SnackBar with a button to request the missing permission. 129 Snackbar.make(mLayout, "Camera access is required to display the camera preview." [all...] |
/developers/samples/android/system/RuntimePermissionsBasic/Application/src/main/java/com/example/android/basicpermissions/ |
MainActivity.java | 27 import android.support.design.widget.Snackbar; 86 Snackbar.make(mLayout, "Camera permission was granted. Starting preview.", 87 Snackbar.LENGTH_SHORT) 92 Snackbar.make(mLayout, "Camera permission request was denied.", 93 Snackbar.LENGTH_SHORT) 106 Snackbar.make(mLayout, 108 Snackbar.LENGTH_SHORT).show(); 120 * a SnackBar that includes additional information. 128 // Display a SnackBar with a button to request the missing permission. 129 Snackbar.make(mLayout, "Camera access is required to display the camera preview." [all...] |
/development/samples/browseable/RuntimePermissionsBasic/src/com.example.android.basicpermissions/ |
MainActivity.java | 27 import android.support.design.widget.Snackbar; 86 Snackbar.make(mLayout, "Camera permission was granted. Starting preview.", 87 Snackbar.LENGTH_SHORT) 92 Snackbar.make(mLayout, "Camera permission request was denied.", 93 Snackbar.LENGTH_SHORT) 106 Snackbar.make(mLayout, 108 Snackbar.LENGTH_SHORT).show(); 120 * a SnackBar that includes additional information. 128 // Display a SnackBar with a button to request the missing permission. 129 Snackbar.make(mLayout, "Camera access is required to display the camera preview." [all...] |
/packages/apps/Dialer/src/com/android/dialer/ |
FloatingActionButtonBehavior.java | 20 import android.support.design.widget.Snackbar.SnackbarLayout; 26 * Implements custom behavior for the movement of the FAB in response to the Snackbar. 29 * the appearance and disappearance of a Snackbar.
|
/frameworks/base/docs/html/sdk/support_api_diff/22.2.1/changes/ |
android.support.design.widget.Snackbar.html | 10 android.support.design.widget.Snackbar 74 Class android.support.design.widget.<A HREF="../../../../reference/android/support/design/widget/Snackbar.html" target="_top"><font size="+2"><code>Snackbar</code></font></A> 86 <A NAME="android.support.design.widget.Snackbar.setActionTextColor_added(android.content.res.ColorStateList)"></A> 87 <nobr><code>Snackbar</code> <A HREF="../../../../reference/android/support/design/widget/Snackbar.html#setActionTextColor(android.content.res.ColorStateList)" target="_top"><code>setActionTextColor</code></A>(<code>ColorStateList</code>)</nobr> 93 <A NAME="android.support.design.widget.Snackbar.setActionTextColor_added(int)"></A> 94 <nobr><code>Snackbar</code> <A HREF="../../../../reference/android/support/design/widget/Snackbar.html#setActionTextColor(int)" target="_top"><code>setActionTextColor</code></A>(<code>int</code>)</nobr> 109 <A NAME="android.support.design.widget.Snackbar.LENGTH_INDEFINITE"></A [all...] |
/frameworks/support/design/res/layout/ |
design_layout_snackbar.xml | 19 class="android.support.design.widget.Snackbar$SnackbarLayout" 24 style="@style/Widget.Design.Snackbar" /
|
/frameworks/support/design/res/layout-sw600dp/ |
design_layout_snackbar.xml | 19 class="android.support.design.widget.Snackbar$SnackbarLayout" 24 style="@style/Widget.Design.Snackbar" /
|
/packages/apps/DeskClock/src/com/android/deskclock/alarms/ |
AlarmUpdateHandler.java | 22 import android.support.design.widget.Snackbar; 191 SnackbarManager.show(Snackbar.make(mSnackbarAnchor, text, Snackbar.LENGTH_SHORT)); 204 final Snackbar snackbar = Snackbar.make(mSnackbarAnchor, local 205 mAppContext.getString(R.string.alarm_deleted), Snackbar.LENGTH_LONG) 213 SnackbarManager.show(snackbar);
|