I want to have a list view with each row having two buttons like this
---------------------------------------------------------------
[TEXTVIEW] [BUTTON][TV][BUTTON]
---------------------------------------------------------------
Here I have a onClick for the Buttons to perform some function.
Apart from this I also want to get the onItemClick for the the whole list row also. which on click will give me the rowId which i'll be using to call another method...
Need some assist with the above mentioned....
public class MyListAdapter extends ArrayAdapter {
Activity contextACT;
@Override
public void notifyDataSetChanged() {
super.notifyDataSetChanged();
}
public MyListAdapter(Activity context) {
super(context, R.layout.nrrow_of_list_lesson, dummyVal);
this.contextACT = context;
}
public View getView(final int row_position, View convertView,
ViewGroup parent) {
LayoutInflater inflator = contextACT.getLayoutInflater();
final View row = inflator.inflate(R.layout.nrrow_of_list_lesson,
null);
final TextView name = (TextView) row.findViewById(R.id.lessonname);
final TextView period = (TextView) row.findViewById(R.id.TVmid);
TextView slNumber = (TextView) row.findViewById(R.id.lessonslno);
final Button increase = (Button) row.findViewById(R.id.BTIncrease);
final Button decrease = (Button) row.findViewById(R.id.BTDecrease);
}
Since I have a button's Onclick i'm not able to get the rowList's onItemClickListener....