android - Can't do intent on MapFragment class to another activity class -
i've searched , tried many ways on doing intent getactivity() / v.this / , app still stop working when clicking textview reservereply class simple imageview.
---- mapfragment.class ------
@override public void onclick(view v) {
// put intent on front of codes test btw
intent intent = new intent(mapfragment.this, reservereply.class); startactivity(intent); final string parkname = (string) v.gettag(); final string name = "testing test"; final string age = "21"; stringrequest request = new stringrequest(request.method.post, inserturl, new response.listener<string>() { @override public void onresponse(string response) { system.out.println(response.tostring()); } }, new response.errorlistener() { @override public void onerrorresponse(volleyerror error) { } }) { @override protected map<string, string> getparams() throws authfailureerror { map<string,string> parameters = new hashmap<string, string>(); parameters.put("firstname",parkname); parameters.put("lastname",name); parameters.put("age",age); return parameters; } }; requestqueue.add(request); }
}
---- reservereply.class
@override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.reservation_reply); imgreply = (imageview)findviewbyid(r.id.imgreply); imgreply.setimageresource(r.drawable.waiting); }
}
i tried implement view.onclicklistener in fragment not working. instead use setonclicklistener method directly , stuff... upvote if it...
Comments
Post a Comment