Wednesday 15 February 2012

android - list View click to set button to be visible -



android - list View click to set button to be visible -

i got these list view. want set deleterowbutton visible when tap on list row (i want button show in row tapped). gave button android:visibility="invisible" attribute , added these 2 lines onitemclick method:`

@override public void onitemclick(adapterview<?> arg0, view arg1, int arg2, long arg3) { deleterowbutton = (textview) findviewbyid(r.id.listrowdeletebutton); deleterowbutton.setvisibility(view.visible); }

but when tap on list row, deleterowbutton shows in row @ top of list (not 1 tapped). how can accomplish this?

try finding textview in item clicked:

deleterowbutton = (textview) arg1.findviewbyid(r.id.listrowdeletebutton);

android android-listview

No comments:

Post a Comment