Android: static reference / non-static method when using onClickListener(); -


i want call onclicklistener() there problem

cannot make static reference non-static method setonclicklistener(view.onclicklistener) type view 

my relevant code:

intent intent = getintent();          final string edittextstr = intent.getextras().getstring("url");         imageview.setonclicklistener(new view.onclicklistener() {               @override               public void onclick(view view) {                   uri uri = uri.parse(putextra(edittextstr));                intent intent = new intent(intent.action_view, uri);             startactivity(intent);               }              }); 

please me please

imageview class. calling setonclicklistener method on classname tring call static method not static method.

final imageview imageview = (imageview)findviewbyid(r.id.<id in layout xml file>); imageview.setonclicklistener(....);


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -