android - problem with intent - onClick compared to a onListItemClick -
i'm using following intent pass on next screen shows user information can edited , saved.......this works good
@override protected void onlistitemclick(listview l, view v, int position, long id) { super.onlistitemclick(l, v, position, id); intent = new intent(this, contact.class); i.putextra(notesdbadapter.key_rowid, id); startactivityforresult(i, activity_edit); }
however on contact screen have button , use following go admin screen can edit , save other information, when click button screen goes black , terminates.
public void onclick(view v) { string id = null; switch (v.getid()) { case r.id.admin: // dostuff intent = new intent(this, admin.class); i.putextra(notesdbadapter.key_rowid, id); startactivity(i); break;
i'm sure key_rowid problem , needs recoded work onclick compared onlistitemclick....... tryed alot no luck, great.
i think problem in first example view passed in container row , in second example it's button.
Comments
Post a Comment