How can I add get the reference of that textview
while click the button in the list view row?
**---------------------------------
TextView
Button
---------------------------------**
This is the example of my list view.
I have used the View Holder concept to manipulate the listview
dynamically.
if i click the button, the value of textview
want to change.
I had tried to change the value of the texview
values while click the button, but the it updates the last row textview
value for every button I click.
thanks and regards.
Finally I got the answer following:
public void onClick(View v) {
// TODO Auto-generated method stub
LinearLayout layout=(LinearLayout) v.getParent();
TextView text=(TextView)layout.findViewById(R.id.qcountHD);
if (view.inc.getId() == v.getId()) {
int count = Integer.parseInt(text.getText().toString());
text.setText("" + (++count));
} else if (view.dec.getId() == v.getId()) {
int count = Integer.parseInt(text.getText().toString());
if (!(count == 0)) {
text.setText("" + (--count));
}
}
}
Thanks for the support.....