Question

I intend to use button inside listview items, however I have not see much apps doing so and sdk also does not provide any straightforward way to do so, I am assuming that it conflicts some of the HCI guidlines or there must be some reason for this, are there any specific points because of which this is not implemented such.

Was it helpful?

Solution

I dont see any issue using buttons inside a ListView. For example you can use toggle buttons for settings activity.. As mentioned in the Joost's answer you have to use an Adapter and a layout for implementing this.. You can some other related answers from here and here. You may refer this article as well..

OTHER TIPS

You probably want to create your own ListAdapter and XML for the layout of the list items. This tutorial explains how to create your own ListAdapter and XML: Custom ListView items and adapters. Inside the ListAdapter you should add the code to control the button.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top