I have a Listview
that will list the alarms which are in the database.I need to add a Toggle
Button beside each list item to set the alarm on/off
Try creating a custom adapter like:
public class YourAdapter extends BaseAdapter
and a custom layout for the rows with a toggle button (you will have to inflate the layout in the method geView).
Here you can find an example: http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/
Hope this helps..