android-Button's clickevent of listView using BaseAdapter
<p>I am using <strong>Listview</strong> With custom Adapter which contain imageview,textview and 3 button (insert,update,delete)requirement is that custom adapter is call every time inside BROADCAST receiver until intentfilter matched and i also set onclicklistener of button in getView method of base adapter.</p>

<p><strong>The problem is that only the last row of listview button is only clickable..But i want all the button of all row must clickable.</strong></p>

<p>Can anybody give me suggestion or any idea how I can proceed for that problem.</p>

<pre><code>public View getView(final int position, View view, ViewGroup parent) {
    // TODO Auto-generated method stub

            pos=position;

    if(view==null)
    {
        LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        view=inflater.inflate(R.layout.device_name, parent, false);
    }

    TextView text_view=(TextView)view.findViewById(R.id.textview_deviceName);

    ImageView image_view=(ImageView)view.findViewById(R.id.imageView1);

    text_view.setText(strDeviceName[position]);
    if(strMajorDevice[position].equalsIgnoreCase("phone"))
    {
        image_view.setImageResource(int_image[0]);
    }
    else
    {
        image_view.setImageResource(int_image[1]);
    }
    btnAdd=(Button)view.findViewById(R.id.btn_add);
    btnUpdate=(Button)view.findViewById(R.id.btn_update);
    btnDelete=(Button)view.findViewById(R.id.btn_delete);

    btnAdd.setOnClickListener(this);
    btnUpdate.setOnClickListener(this);
    btnDelete.setOnClickListener(this);
    return view;
}

@Override
public void onClick(View v) {
    // TODO Auto-generated method stub
    if(v==btnAdd)
    {
        Toast.makeText(context, "ADD", Toast.LENGTH_LONG).show();
        Intent intent = new Intent(context,MaterDeviceFormActivity.class);
        intent.putExtra("button","add");
        intent.putExtra("device_address", strDviceAddess[pos]);
        context.startActivity(intent);

    }
    else if(v==btnUpdate)
    {
        Toast.makeText(context, "UPDATE", Toast.LENGTH_LONG).show();
        Intent intent = new Intent(context,MaterDeviceFormActivity.class);
        intent.putExtra("button","update");
        intent.putExtra("device_address", strDviceAddess[pos]);
        context.startActivity(intent);
    }
    else if(v==btnDelete)
    {
        Toast.makeText(context, "DELETE", Toast.LENGTH_LONG).show();
        Intent intent = new Intent(context,MaterDeviceFormActivity.class);
        intent.putExtra("button","delete");
        intent.putExtra("device_address", strDviceAddess[pos]);
        context.startActivity(intent);
    }
}
</code></pre>
