Android listview selected item while button click -
im newbie android development. have 3 textviews , button in listview control. doubt while clicking on button want selected list items textview text, may know how it?
first take text of textview in string , (i guess have send other activity if im r8 do in following code)
string xyz = textview.gettext().tostring(); button = (button) findviewbyid(r.id.button); button.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { // todo auto-generated method stub intent intent = new intent(your_present_activity.this, your_next_activity.class); intent.putextra("key", xyz); startactivity(intent); } }); then in your_next_activity
intent in = getintent(); string str = in.getstringextra(("key"));
Comments
Post a Comment