Check following link
This is very easy tutorial for beginners...
http://www.thepcwizard.in/2012/09/android-creating-custom-listview-for.html
Android programming related helpful answers and important links available here...
My Stack Overflow Account: http://stackoverflow.com/users/1280397/ranjit-chandel
Button call = (Button) rowView.findViewById(R.id.button1);
call.setTag(position);
call.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
int which = -1;
Obejct obj = v.getTag();
if(obj instaceof Integer){
which = ((Integer)obj).intValue();
}
if(which >-1){
//write code here to get value from any way using position means which
Toast.makeText(getContext(), "Current clicked position is : "+which, 1).show();
}
}
});
Reference from: http://stackoverflow.com/questions/11156078/android-get-the-listview-item-from-button-clicked-in-custom-listview