I have an application that uses Toast and I have tested it on a Samsung Galaxy II using Android 4.3 and it works fine.
I have recently gotten a Nexus 5 running Android 4.4 KitKat and when I try to load the Toast it doesn't appear.
Has Toast been removed or the syntax altered in KitKat?
This is the code I'm using to make and call the Toast:
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item)
{
int itemId = item.getItemId();
switch (itemId) {
case R.id.action_settings:
Log.e("TOAST","This was called");
Toast.makeText(MainActivity.this, "This is my Toast message!",Toast.LENGTH_LONG).show();
break;
}
return true;
}
I have Debugged the code and stepped through this part line by line so it is definitely being called, but nothing happens.