-6

I am trying to add another Toast message for my application, I've already made the first one when data is empty Toast message pop up and say " Sorry data still empty" and I would like make another one message pop up when there is data is available like "Data successfully loaded".

Here is my code:

if (gamename.isEmpty()){
            Toast.makeText(spk_activity.this,"Sorry Data Still Empty",Toast.LENGTH_SHORT).show();
Gowtham Subramaniam
  • 3,358
  • 2
  • 19
  • 31

1 Answers1

0

You can just write another code in your activity. Like below

if (gamename.isLoaded()){ Toast.makeText(spk_activity.this,"Data succesfully loaded",Toast.LENGTH_SHORT).show();