Questions tagged [toast]

A toast notification is a transient message to the user that contains relevant, time-sensitive information and provides quick access to related content in an app.

A toast notification is a small informational popup window in a GUI, used to notify the user of an event or status change. The user cannot interact with a toast notification, which fades away after a short amount of time. The term was allegedly coined during the development of MSN Messenger because the notification windows slid up from the bottom of the screen, like toast popping up from a toaster.

Within stackoverflow, the tag most often refers to the Android class android.widget.Toast. For more information, see Creating Toast Notifications.

2068 questions
0
votes
1 answer

Android spinner item position

I am having a problem with my code that is supposed to display a toast when a button is clicked. public class MainActivity extends AppCompatActivity { public Spinner spinner; protected void onCreate(Bundle savedInstanceState) { …
Damian
  • 23
  • 1
  • 5
0
votes
1 answer

Why doesn't the 'toast' message work, in Android? Cannot fix bug, please help!

Imagine I have the following code that runs as a background processor for an android application: public class Background extends Service { public void popup (String message, int duration) { Toast.makeText(this, message,…
androidNoob
  • 229
  • 1
  • 3
  • 9
0
votes
1 answer

Have the toast fill the whole display still having the text in the middle

@Override public void onClick(View view) { switch (view.getId()) { case R.id.btnOKButt: displayToast("My text"); startActivity(new Intent(Activity1.this, Activity2.class)); finish(); …
Code-G
  • 41
  • 5
0
votes
2 answers

using query to read the last value and change it firebase angularjs 1

I have this database service/ -KSxobYDhjUJeSvu3dC1 -Accion:"Nueva ronda" -Codigo: 3 -dateTime: 1475284727 -notify: 0 -num_mesa: 0 -KSxobptdYSc-qrCSbyU -Accion: "Orden cancelada" -dateTime: 1475284728 -notify: 0 -num_mesa: 0 and then I…
2one2
  • 381
  • 2
  • 10
  • 23
0
votes
1 answer

Display Log.e() as a Toast

I'm currently working with my first app and i use try and catch code, so i give a Log.e() to display error messages. So i ask how to display Log.e() error as a Toast? Here i attached my code that use JSCH package beny.com.solehap; import…
0
votes
1 answer

Why does my toast not display on my emulator?

I have a very basic pqctice app working with a CalendarView. I'd like a toast to display the date when a different date than the current is called. The main activity displays fine and the view works, but the toast does not display at any point.…
Andrea McKenzie
  • 239
  • 1
  • 12
0
votes
1 answer

How to Toast "No Data Found" From JSON parsing if getting null value in Android

I am parsing JSON value from URL if i get null value so i want Toast "data not found" my code here @Override protected List
doInBackground(String... params) { List
result = new ArrayList
(); …
Yuvaan Chauhan
  • 344
  • 1
  • 3
  • 12
0
votes
3 answers

Materializecss Toasts with PHP

So I'm making this web control panel but I'm not good with JS. I'm using MaterializeCSS + HTML + PHP for the DB login and so on. I would like to have the following simple functionality but for some reason I'm failing. I'd like to fill in the…
iBobb
  • 1,140
  • 1
  • 14
  • 35
0
votes
0 answers

Template10 - Open Browser in OnStartAsync

I implemented a toast with to open an url. Here's the toast: Go To bing.com After that I added the handling to the OnStartAsync-Method: public override Task…
sk2andy
  • 749
  • 1
  • 8
  • 19
0
votes
1 answer

ToastAndroid showWithGravity Error

Following the document, I am including a toast in my projects: import {ToastAndroid} from react-native ToastAndroid.showWithGravity('A toast with gravity',ToastAndroid.SHORT,ToastAndroid.TOP); But I got an error: However, if I replace…
Klyment
  • 187
  • 1
  • 2
  • 11
0
votes
3 answers

getContext () , getApplicationContext(), getBaseContext are not working in Android

I want to show a toast message but getContext() in Toast.makeText((getContext()," Message" , Toat.LENGTH_LONG.show())) is giving error Cannot resolve Method. The problem is that in which class I want to show the Toast message is not MainActivity…
user6750923
  • 469
  • 2
  • 11
  • 22
0
votes
1 answer

UWP toast custom sound doesn't play

I have this toast to show up and everything is fine except audio. I was trying to put toast.mp3 in different locations like projects main folder, Assets etc. and even used path like D:/MyProjectPath/Assets/toast.mp3 and still notification is silent.…
Yoki
  • 13
  • 1
  • 6
0
votes
1 answer

Make text displayed in toast selectable

I want the text displayed in a Toast message to be selectable (as in copy and pastable). Is this possible? I know it's possible to create a custom Toast message and set the TextView in the layout to be selectable, but that has not been working so…
Paul Kim
  • 1
  • 2
0
votes
1 answer

Android: Toast in tabbed application & Next page onclick in tabbed application

I am trying to create a Toast from inside my fragment. I have been searching for hours on the internet and all I come across doesn't seem to work. information.setOnClickListener(new View.OnClickListener() { public void onClick(View…
Meindert Stijfhals
  • 355
  • 1
  • 3
  • 12
0
votes
4 answers

How to make a toast and then change the screen at the same button click ios swift

I am trying to show a toast when the user hits the register button and then direct the user to the login screen as follows: print("Registration Successful") self.view.makeToast("Registration Successful") let nextViewController =…
Khadija Daruwala
  • 1,185
  • 3
  • 25
  • 54
1 2 3
99
100