HomeSort by relevance Sort by last modified time
    Searched refs:toast (Results 1 - 25 of 107) sorted by null

1 2 3 4 5

  /external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
ShadowToastTest.java 8 import android.widget.Toast;
19 Toast toast = Toast.makeText(RuntimeEnvironment.application, "short toast", Toast.LENGTH_SHORT); local
20 assertThat(toast).isNotNull();
21 assertThat(toast.getDuration()).isEqualTo(Toast.LENGTH_SHORT);
26 Toast toast = Toast.makeText(RuntimeEnvironment.application, "long toast", Toast.LENGTH_LONG) local
33 Toast toast = Toast.makeText(RuntimeEnvironment.application, "short toast", Toast.LENGTH_SHORT); local
44 Toast toast = Toast.makeText(RuntimeEnvironment.application, "short toast", Toast.LENGTH_SHORT); local
54 Toast toast = Toast.makeText(RuntimeEnvironment.application, "short toast", Toast.LENGTH_SHORT); local
64 Toast toast = new Toast(RuntimeEnvironment.application); local
73 Toast toast = Toast.makeText(RuntimeEnvironment.application, "short toast", Toast.LENGTH_SHORT); local
81 Toast toast = Toast.makeText(RuntimeEnvironment.application, "short toast", Toast.LENGTH_SHORT); local
90 Toast toast = Toast.makeText(RuntimeEnvironment.application, "short toast", Toast.LENGTH_SHORT); local
    [all...]
  /packages/apps/DeskClock/src/com/android/deskclock/widget/toast/
ToastManager.java 17 package com.android.deskclock.widget.toast;
19 import android.widget.Toast;
23 private static Toast sToast = null;
29 public static void setToast(Toast toast) {
32 sToast = toast;
SnackbarManager.java 17 package com.android.deskclock.widget.toast;
  /frameworks/support/core/ktx/src/androidTest/java/androidx/core/widget/
ToastTest.kt 23 import android.widget.Toast
37 val toast = context.toast("Short Toast")
38 assertEquals(Toast.LENGTH_SHORT, toast.duration)
39 assertTrue(containsText(toast.view, "Short Toast"))
40 assertTrue(toast.view.isVisible)
45 val toast = context.toast("Long Toast", Toast.LENGTH_LONG
    [all...]
  /external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/
ToastTest.java 6 import android.widget.Toast;
18 Toast toast = Toast.makeText(new Activity(), "short toast", local
19 Toast.LENGTH_SHORT);
20 assertNotNull(toast);
21 assertEquals(Toast.LENGTH_SHORT, toast.getDuration());
26 Toast toast = Toast.makeText(new Activity(), "long toast" local
    [all...]
  /frameworks/base/packages/SystemUI/src/com/android/systemui/
SysUIToast.java 21 import android.widget.Toast;
22 import static android.widget.Toast.Duration;
26 public static Toast makeText(Context context, @StringRes int resId, @Duration int duration) {
30 public static Toast makeText(Context context, CharSequence text, @Duration int duration) {
31 Toast toast = Toast.makeText(context, text, duration); local
32 toast.getWindowParams().privateFlags |=
34 return toast;
  /packages/apps/TV/src/com/android/tv/util/
ToastUtils.java 21 import android.widget.Toast;
24 /** A utility class for the toast message. */
26 private static WeakReference<Toast> sToast;
28 /** Shows the toast message after canceling the previous one. */
34 Toast toast = Toast.makeText(context, text, duration); local
35 toast.show();
36 sToast = new WeakReference<>(toast);
  /cts/tests/tests/toastlegacy/
Android.mk 29 ../toast/src/android/widget/toast/cts/BaseToastTest.java
  /external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/
ShadowToast.java 6 import android.widget.Toast;
17 * Shadow of {@code Toast} that tracks {@code Toast} requests. Hear hear! (*clink*)
20 @Implements(Toast.class)
27 @RealObject Toast toast; field in class:ShadowToast
30 public static Toast makeText(Context context, int resId, int duration) {
35 public static Toast makeText(Context context, CharSequence text, int duration) {
36 Toast toast = new Toast(null) local
    [all...]
  /cts/tests/tests/widget/src/android/widget/cts/
ToastTest.java 40 import android.widget.Toast;
52 private static final String TEST_TOAST_TEXT = "test toast";
55 private Toast mToast;
75 new Toast(mContext);
81 new Toast(null);
94 // sleep a while and then make sure do not show toast
111 () -> mToast = Toast.makeText(mContext, TEST_TOAST_TEXT, Toast.LENGTH_LONG));
136 Toast toast = new Toast(mContext) local
320 Toast toast = Toast.makeText(mContext, "android", Toast.LENGTH_SHORT); local
348 Toast toast = Toast.makeText(mContext, R.string.hello_world, Toast.LENGTH_LONG); local
371 Toast toast = Toast.makeText(mContext, R.string.text, Toast.LENGTH_LONG); local
383 Toast toast = Toast.makeText(mContext, R.string.text, Toast.LENGTH_LONG); local
390 Toast toast = Toast.makeText(mContext, R.string.text, Toast.LENGTH_LONG); local
402 Toast toast = Toast.makeText(mContext, R.string.text, Toast.LENGTH_LONG); local
    [all...]
  /frameworks/support/core/ktx/src/main/java/androidx/core/widget/
Toast.kt 22 import android.widget.Toast
26 * Creates and shows a [Toast] with the given [text]
28 * @param duration Toast duration, defaults to [Toast.LENGTH_SHORT]
30 inline fun Context.toast(text: CharSequence, duration: Int = Toast.LENGTH_SHORT): Toast {
31 return Toast.makeText(this, text, duration).apply { show() }
35 * Creates and shows a [Toast] with text from a resource
38 * @param duration Toast duration, defaults to [Toast.LENGTH_SHORT
    [all...]
  /external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
ShadowToast.java 8 import android.widget.Toast;
16 @Implements(Toast.class)
25 @RealObject Toast toast; field in class:ShadowToast
31 public static Toast makeText(Context context, int resId, int duration) {
36 public static Toast makeText(Context context, CharSequence text, int duration) {
37 Toast toast = new Toast(context); local
38 toast.setDuration(duration)
    [all...]
  /frameworks/base/tests/StatusBar/src/com/android/statusbartest/
ToastTest.java 32 import android.widget.Toast;
44 Toast mToast1;
45 Toast mToast2;
89 mToast1 = Toast.makeText(ToastTest.this, text, Toast.LENGTH_SHORT);
94 new Test("Make Toast #1") {
97 mToast1 = Toast.makeText(ToastTest.this, "hi 1", Toast.LENGTH_SHORT);
101 new Test("Show Toast #1") {
108 new Test("Update Toast #1")
    [all...]
  /packages/apps/TvSettings/Settings/src/com/android/tv/settings/accessories/
BluetoothDevicePickerActivity.java 23 import android.widget.Toast;
42 Toast toast = Toast.makeText(this, error, Toast.LENGTH_SHORT); local
43 toast.show();
  /cts/apps/CtsVerifier/src/com/android/cts/verifier/jobscheduler/
ConstraintTestActivity.java 12 import android.widget.Toast;
47 Toast toast = local
48 Toast.makeText(
51 Toast.LENGTH_SHORT);
52 toast.show();
100 final Toast toast = local
101 Toast.makeText(
105 Toast.LENGTH_SHORT)
    [all...]
  /frameworks/base/packages/EasterEgg/src/com/android/egg/neko/
NekoActivationActivity.java 21 import android.widget.Toast;
27 Toast toast = Toast.makeText(this, s, Toast.LENGTH_SHORT); local
28 toast.getView().setBackgroundDrawable(null);
29 toast.show();
  /frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
ScreenPinningNotify.java 23 import android.widget.Toast;
37 private Toast mLastToast;
44 /** Show "Screen pinned" toast. */
49 /** Show "Screen unpinned" toast. */
54 /** Show a toast that describes the gesture the user should use to escape pinned mode. */
58 Slog.i(TAG, "Ignore toast since it is requested in very short interval.");
70 private Toast makeAllUserToastAndShow(int resId) {
71 Toast toast = SysUIToast.makeText(mContext, resId, Toast.LENGTH_LONG) local
    [all...]
  /frameworks/support/samples/Support4Demos/src/main/java/com/example/android/supportv4/app/
SimpleJobIntentService.java 26 import android.widget.Toast;
55 toast("Executing: " + label);
70 toast("All work complete");
76 void toast(final CharSequence text) { method in class:SimpleJobIntentService
79 Toast.makeText(SimpleJobIntentService.this, text, Toast.LENGTH_SHORT).show();
  /developers/build/prebuilts/gradle/AutoBackupForApps/Application/src/main/java/com/example/android/autobackupsample/
AddFileActivity.java 30 import android.widget.Toast;
50 * if intent parameters are specified incorrectly or it will display Toast messages to the user
150 Toast toast = Toast.makeText(this, getText(R.string.file_exists), Toast.LENGTH_LONG); local
151 toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
152 toast.show();
157 Toast toast = Toast.makeText(this, getText(R.string.file_size_is_invalid) local
167 Toast toast = Toast.makeText(this, local
264 Toast toast = Toast.makeText(this, message, Toast.LENGTH_LONG); local
    [all...]
  /developers/samples/android/content/AutoBackupForApps/Application/src/main/java/com/example/android/autobackupsample/
AddFileActivity.java 30 import android.widget.Toast;
50 * if intent parameters are specified incorrectly or it will display Toast messages to the user
150 Toast toast = Toast.makeText(this, getText(R.string.file_exists), Toast.LENGTH_LONG); local
151 toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
152 toast.show();
157 Toast toast = Toast.makeText(this, getText(R.string.file_size_is_invalid) local
167 Toast toast = Toast.makeText(this, local
264 Toast toast = Toast.makeText(this, message, Toast.LENGTH_LONG); local
    [all...]
  /development/samples/browseable/AutoBackupForApps/src/com.example.android.autobackupsample/
AddFileActivity.java 30 import android.widget.Toast;
50 * if intent parameters are specified incorrectly or it will display Toast messages to the user
150 Toast toast = Toast.makeText(this, getText(R.string.file_exists), Toast.LENGTH_LONG); local
151 toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
152 toast.show();
157 Toast toast = Toast.makeText(this, getText(R.string.file_size_is_invalid) local
167 Toast toast = Toast.makeText(this, local
264 Toast toast = Toast.makeText(this, message, Toast.LENGTH_LONG); local
    [all...]
  /cts/tests/tests/toast/src/android/widget/toast/cts/
LegacyToastTest.java 17 package android.widget.toast.cts;
28 * like this app the only way to add toast windows is via the dedicated
29 * toast APIs.
35 // Normal toast windows cannot be obtained vie the accessibility APIs because
42 // Normal toast windows cannot be obtained vie the accessibility APIs because
54 fail("Shouldn't be able to add toast windows directly");
  /cts/tests/tests/toastlegacy/src/android/widget/toast/cts/legacy/
ToastActivity.java 17 package android.widget.toast.cts.legacy;
  /development/samples/ApiDemos/src/com/example/android/apis/view/
SecureView.java 30 import android.widget.Toast;
39 * or would at least think long and hard about it. However, a carefully crafted toast can
41 * are innocuous. Since the toast cannot receive input, the touches are passed down to the
45 * a toast layed out so as to cover the buttons and part of the descriptive text.
52 * When the toast appears, this button remains clickable as usual which creates an
57 * When the toast appears, the button does not receive the touch and appears to be inoperable.
97 // Generate a toast view with a special layout that will position itself right
103 Toast toast = new Toast(getApplicationContext()) local
    [all...]
  /external/sl4a/Utils/src/com/googlecode/android_scripting/
Log.java 26 import android.widget.Toast;
42 private static void toast(Context context, String message) { method in class:Log
43 Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
114 toast(context, message); method
119 toast(context, message); method
136 toast(context, message); method
141 toast(context, message); method
158 toast(context, message); method
163 toast(context, message) method
176 toast(context, message); method
181 toast(context, message); method
194 toast(context, message); method
199 toast(context, message); method
    [all...]

Completed in 1259 milliseconds

1 2 3 4 5