-6

I want to make long toast, but I don't understand it completely. Can you help me?

public void onClick(View v) {


    showing  = new StringBuilder();


    if (yes.isChecked())           {
        diana.setEnabled(true);
        jimmy.setEnabled(true);
        dina.setEnabled(true);
        jack.setEnabled(true);      } 

    if(no.isChecked()==true) {
         diana.setChecked(false);
         jimmy.setChecked(false);
         dina.setChecked(false);
         jack.setChecked(false);
          }

     if(diana.isChecked())
        {showing.append(" Diana ");}
     if(jimmy.isChecked())
        {showing.append(" Jimmy ");}
     if(dina.isChecked())
        {showing.append(" Dina ");}
     if(jack.isChecked())
        {showing.append(" jhftytuyhuggfdefrtgyh sdhcgwefguwiuh ");}

//**************************thats true??????????????*******************//    
        switch (v.getId()) {
        case R.id.show:
            NotificationManagerService.scheduleTimeoutLocked() {
            if(yes.isChecked())
            {Toast.makeText(MyClass.this, "You have selected " + str, Toast.LENGTH_LONG).show();}
            long delay = immediate ? 0 : (r.duration == Toast.LENGTH_LONG ? LONG_DELAY : SHORT_DELAY);
            private static final int LONG_DELAY = 3500; // 3.5 seconds
            private static final int SHORT_DELAY = 2000; // 2 seconds
    }
}
}
Esoteric Screen Name
  • 6,082
  • 4
  • 29
  • 38
  • Can you provide more information? where is your code breaking? – Matt May 15 '13 at 18:17
  • Its from case to bellow. hmm about Multiple markers at this line - Syntax error, insert "}" to complete MethodBody - immediate cannot be resolved to a variable - r cannot be resolved to a variable – Diah Permatasari May 15 '13 at 18:19
  • possible duplicate of [Can an Android Toast be longer than "Toast.LENGTH\_LONG"?](http://stackoverflow.com/questions/2220560/can-an-android-toast-be-longer-than-toast-length-long) – Pragnani May 15 '13 at 18:24
  • I dont know posistion of sourcode. But Thankyou :) – Diah Permatasari May 15 '13 at 18:33

2 Answers2

0

This has already been answered, you need to use a Status Bar Notification

Google Search Engine


Toast Length Post

Community
  • 1
  • 1
Matt
  • 4,107
  • 3
  • 29
  • 38
0
Toast.makeText(this, "YOUR TEXT HERE", Toast.LENGTH_LONG).show();