/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 preemptive dismiss of current displayed Snackbar. 28 private static WeakReference<Snackbar> sSnackbar = null; 32 public static void show(Snackbar snackbar) { 33 sSnackbar = new WeakReference<>(snackbar); 34 snackbar.show(); 38 final Snackbar snackbar = sSnackbar == null ? null : sSnackbar.get() local [all...] |
/packages/apps/DocumentsUI/src/com/android/documentsui/ui/ |
Snackbars.java | 21 import android.support.design.widget.Snackbar; 35 Snackbars.makeSnackbar(activity, msg, Snackbar.LENGTH_SHORT).show(); 40 makeSnackbar(activity, message, Snackbar.LENGTH_SHORT).show(); 45 makeSnackbar(activity, message, Snackbar.LENGTH_SHORT).show(); 50 makeSnackbar(activity, message, Snackbar.LENGTH_SHORT).show(); 55 makeSnackbar(activity, message, Snackbar.LENGTH_SHORT).show(); 60 makeSnackbar(activity, message, Snackbar.LENGTH_SHORT).show(); 64 makeSnackbar(activity, R.string.file_operation_rejected, Snackbar.LENGTH_SHORT).show(); 68 makeSnackbar(activity, R.string.file_operation_error, Snackbar.LENGTH_SHORT).show(); 72 makeSnackbar(activity, R.string.rename_error, Snackbar.LENGTH_SHORT).show() 83 Snackbar snackbar = makeSnackbar(activity, text, Snackbar.LENGTH_SHORT); local [all...] |
/frameworks/support/design/tests/src/android/support/design/widget/ |
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.showTransientBottomBarAndWaitUntilFullyShown(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.showTransientBottomBarAndWaitUntilFullyShown(snackbar); 61 // Check that the Snackbar view has padding set to display above the nav bar 62 final View view = snackbar.getView();
|
CustomSnackbarTest.java | 58 void dismiss(CustomSnackbar snackbar); 71 private void verifySnackbarContent(final CustomSnackbar snackbar, final String expectedTitle, 73 // Show the snackbar 74 SnackbarUtils.showTransientBottomBarAndWaitUntilFullyShown(snackbar); 78 isDescendantOfA(isAssignableFrom(Snackbar.SnackbarLayout.class)), 84 isDescendantOfA(isAssignableFrom(Snackbar.SnackbarLayout.class)), 88 // Dismiss the snackbar 89 SnackbarUtils.dismissTransientBottomBarAndWaitUntilFullyDismissed(snackbar); 119 // Verify different combinations of snackbar content (title / subtitle and action) 125 .setSubtitle(SUBTITLE_TEXT).setDuration(Snackbar.LENGTH_SHORT) 147 final CustomSnackbar snackbar = makeCustomSnackbar().setTitle(TITLE_TEXT) local 269 final CustomSnackbar snackbar = makeCustomSnackbar().setTitle(TITLE_TEXT) local [all...] |
SnackbarTest.java | 72 void dismiss(Snackbar snackbar); 85 private void verifySnackbarContent(final Snackbar snackbar, final String expectedMessage, 87 // Show the snackbar 88 SnackbarUtils.showTransientBottomBarAndWaitUntilFullyShown(snackbar); 92 isDescendantOfA(isAssignableFrom(Snackbar.SnackbarLayout.class)), 98 isDescendantOfA(isAssignableFrom(Snackbar.SnackbarLayout.class)), 102 // Dismiss the snackbar 103 SnackbarUtils.dismissTransientBottomBarAndWaitUntilFullyDismissed(snackbar); 150 final Snackbar snackbar = Snackbar.make(mCoordinatorLayout, MESSAGE_TEXT, length) local 313 final Snackbar snackbar = local 327 final Snackbar snackbar = local 343 final Snackbar snackbar = local 365 final Snackbar snackbar = local 388 final Snackbar snackbar = local [all...] |
/packages/apps/DeskClock/src/com/android/deskclock/alarms/ |
AlarmUpdateHandler.java | 22 import android.support.design.widget.Snackbar; 189 SnackbarManager.show(Snackbar.make(mSnackbarAnchor, text, Snackbar.LENGTH_SHORT)); 202 final Snackbar snackbar = Snackbar.make(mSnackbarAnchor, local 203 mAppContext.getString(R.string.alarm_deleted), Snackbar.LENGTH_LONG) 211 SnackbarManager.show(snackbar);
|
/developers/build/prebuilts/gradle/WearNotifications/Application/src/main/java/com/example/android/wearable/wear/wearnotifications/ |
MainActivity.java | 24 import android.support.design.widget.Snackbar; 139 Snackbar snackbar = Snackbar local 143 Snackbar.LENGTH_LONG) 151 snackbar.show(); [all...] |
/developers/build/prebuilts/gradle/WearNotifications/Wearable/src/main/java/com/example/android/wearable/wear/wearnotifications/ |
StandaloneMainActivity.java | 24 import android.support.design.widget.Snackbar; 81 // Needed for {@link SnackBar} to alert users when {@link Notification} are disabled for app. 134 Snackbar snackbar = Snackbar local 138 Snackbar.LENGTH_LONG) 146 snackbar.show(); [all...] |
/developers/samples/android/wearable/wear/WearNotifications/Application/src/main/java/com/example/android/wearable/wear/wearnotifications/ |
MainActivity.java | 24 import android.support.design.widget.Snackbar; 139 Snackbar snackbar = Snackbar local 143 Snackbar.LENGTH_LONG) 151 snackbar.show(); [all...] |
/developers/samples/android/wearable/wear/WearNotifications/Wearable/src/main/java/com/example/android/wearable/wear/wearnotifications/ |
StandaloneMainActivity.java | 24 import android.support.design.widget.Snackbar; 81 // Needed for {@link SnackBar} to alert users when {@link Notification} are disabled for app. 134 Snackbar snackbar = Snackbar local 138 Snackbar.LENGTH_LONG) 146 snackbar.show(); [all...] |
/development/samples/browseable/WearNotifications/Application/src/com.example.android.wearable.wear.wearnotifications/ |
MainActivity.java | 24 import android.support.design.widget.Snackbar; 139 Snackbar snackbar = Snackbar local 143 Snackbar.LENGTH_LONG) 151 snackbar.show(); [all...] |
/development/samples/browseable/WearNotifications/Wearable/src/com.example.android.wearable.wear.wearnotifications/ |
StandaloneMainActivity.java | 24 import android.support.design.widget.Snackbar; 77 // Needed for {@link SnackBar} to alert users when {@link Notification} are disabled for app. 127 Snackbar snackbar = Snackbar local 131 Snackbar.LENGTH_LONG) 139 snackbar.show(); [all...] |
/frameworks/support/design/src/android/support/design/widget/ |
Snackbar.java | 51 * To be notified when a snackbar has been shown or dismissed, you can provide a {@link Callback} 54 public final class Snackbar extends BaseTransientBottomBar<Snackbar> { 57 * Show the Snackbar indefinitely. This means that the Snackbar will be displayed from the time 58 * that is {@link #show() shown} until either it is dismissed, or another Snackbar is shown. 65 * Show the Snackbar for a short period of time. 72 * Show the Snackbar for a long period of time. 79 * Callback class for {@link Snackbar} instances. 86 public static class Callback extends BaseCallback<Snackbar> { 145 final Snackbar snackbar = new Snackbar(parent, content, content); local [all...] |
/packages/apps/DeskClock/src/com/android/deskclock/ |
DeskClock.java | 28 import android.support.design.widget.Snackbar; 93 /** Shows/hides a snackbar explaining which setting is suppressing alarms from firing. */ 97 /** Displays a snackbar explaining why alarms may not fire or may fire silently. */ 100 /** The view to which snackbar items are anchored. */ 506 * @return a Snackbar that displays the message with the given id for 5 seconds 508 private Snackbar createSnackbar(@StringRes int messageId) { 509 return Snackbar.make(mSnackbarAnchor, messageId, 5000 /* duration */); 600 * Shows/hides a snackbar as silencing settings are enabled/disabled. 620 * Displays a snackbar that indicates a system setting is currently silencing alarms. 631 // Create a snackbar with a message explaining the setting that is silencing alarms 632 final Snackbar snackbar = createSnackbar(mSilentSetting.getLabelResId()); local [all...] |
/cts/tests/autofillservice/src/android/autofillservice/cts/ |
UiBot.java | 264 * Asserts the save snackbar is showing and returns it. 271 * Asserts the save snackbar is showing and returns it. 306 * Asserts the save snackbar is not showing and returns it. 360 final UiObject2 snackbar = waitForObject(By.res("android", RESOURCE_ID_SAVE_SNACKBAR), local 364 waitForObject(snackbar, By.res("android", RESOURCE_ID_SAVE_TITLE), UI_TIMEOUT_MS); 369 waitForObject(snackbar, By.res("android", RESOURCE_ID_SAVE_ICON), UI_TIMEOUT_MS); 402 final UiObject2 saveSubTitle = snackbar.findObject(By.text(description)); 408 UiObject2 negativeButton = snackbar.findObject(By.text(negativeButtonText)); 414 assertAccessibilityTitle(snackbar, expectedAccessibilityTitle); 416 return snackbar; [all...] |
/packages/apps/Contacts/src/com/android/contacts/activities/ |
PeopleActivity.java | 40 import android.support.design.widget.Snackbar; 242 Snackbar.make(mLayoutRoot, R.string.connection_error_message, Snackbar.LENGTH_LONG).show(); 919 final Snackbar snackbar = Snackbar.make(mLayoutRoot, message, length) local [all...] |
/prebuilts/sdk/current/support/design/libs/ |
android-support-design.jar | |