Getting the items in listview in android -
i developing application where, each row in list view has got 5 text views(t1..t5) , values in it. have twenty rows each row having different values in textviews.now, when click on item(on single row) page opens 5 text views. questions is, how values of text views in each row page navigating , put values in textviews. values should vary accordingly depending upon position clicking on.
could please me in concept.
try this
listview.setonitemclicklistener(new onitemclicklistener() { @override public void onitemclick(adapterview<?> parent, view view, int position, long id) { string str = ((textview) view.findviewbyid(r.id.someid)).gettext().tostring(); //now pass intent intent intent = new intent(getapplicationcontext(), someactivity.class); intent.putextra("string", str); startactivity(intent); } });
Comments
Post a Comment