Balbir Rathore
Balbir Rathore

Reputation: 113

how to add a button in row of listview whenever particular row is selected?

I am trying to add a button in row of List whenever row is selected first time and remove it when that row selected second time

thanks

Upvotes: 2

Views: 79

Answers (2)

Shruti
Shruti

Reputation: 5591

in your getview function of customListAdapter inflate a layout in which keep visibility of button as GONE,then onclick of listitem change the visibility of that button to VISIBLE.

Upvotes: 2

noxius
noxius

Reputation: 144

in your row xml, add a Button and set visibility to View.GONE. Inplement a clickListener on that row that will toggle visibility between View.VISIBLE and View.GONE

Upvotes: 0

Related Questions