1

How tell which widget is pressed in a custom list adapter?

view story
linux-howto

http://stackoverflow.com – I have a custom list adapter that has a ToggleButton in the xml for each of the list items, so this is an example of two items in the list: I used a link, as I do not have enough reputation to post pictures. The irrelevant parts are blurred out. For the layout for each list item, the ToggleButton has the id "toggleButton1" but this is a problem, as in the onClick function I made called "onTogglePress()" it always references the first one when I use ToggleButton activetoggle = (ToggleButton)this.findViewById(R.id.toggleButton1); to get information about the toggle button, such as if it isChe (HowTos)