android - multiple markers at this line in Eclipse -


eclipse shows me: multiple markers @ line line: public void sendconnection(view view) if can me, thank much

btr = (button)findviewbyid(r.id.connection);         btr.setonclicklistener(new view.onclicklistener() {              public void onclick(view v)              {                 edittext text = (edittext)findviewbyid(r.id.passwordedit);                 string str = text.gettext().tostring();                 if(str.equals("1234"))                 {                     public void sendconnection(view view)                     {                         intent intent = new intent(this, addmasternumber.class);                         startactivity(intent);                     }                 }                 else                 {                     alertdialog alertdialog = new alertdialog.builder(mainactivity.this).create();                     alertdialog.settitle("wrong password");                     alertdialog.seticon(r.drawable.wrongpassword);                     alertdialog.setmessage("the password entered incorrect, please try again!");                     alertdialog.show();                 }              }         }); 

public void onclick(view v)  {     edittext text = (edittext)findviewbyid(r.id.passwordedit);     string str = text.gettext().tostring();     if(str.equals("1234"))     {         sendconnection(v);     }     else     {         alertdialog alertdialog = new alertdialog.builder(mainactivity.this).create();         alertdialog.settitle("wrong password");         alertdialog.seticon(r.drawable.wrongpassword);         alertdialog.setmessage("the password entered incorrect, please try again!");         alertdialog.show();     }  }   public void sendconnection(view view) {     intent intent = new intent(this, addmasternumber.class);     startactivity(intent); } 

you cannot declare function inside function;.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -