Button in a listview - android
<p>I have a class that extends <code>ListActivity</code> with a <code>SimpleAdapter</code> as the list adapter. My code looks like this:</p>

<pre><code>public class ListOfFirms extends ListActivity {

Intent extras;
int time;
String km;
ArrayList&lt;String&gt; firms = new ArrayList&lt;String&gt;(); 
SimpleAdapter adapter;  
static final ArrayList&lt;HashMap&lt;String,String&gt;&gt; list = new ArrayList&lt;HashMap&lt;String,String&gt;&gt;();





  @Override
  public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.firms);


        extras = getIntent();

        time = extras.getIntExtra("time", 0); 
        km = extras.getStringExtra("km");

        adapter = new SimpleAdapter(
                this, list, R.layout.taxi_custom,
                new String[] {"name","price"},
                new int[] {R.id.taxi_name,R.id.taxi_price});

        initializeFirm();
        setListAdapter(adapter);
     }  
</code></pre>

<p>My question is how I can add a button to each element in the list, the button should be floating to right. My list contains object of the class <code>Firm</code>, how can I know which object that I grab out from the list, when a user presses this button? </p>
