textviewリストビュー行のボタンをクリックしているときに、その参照を追加するにはどうすればよいですか?
**------------------------------------------------
TextView Button
----------------------------------**
これは私のリストビューの例です。ビュー ホルダーの概念を使用してlistview動的に操作しました。ボタンをクリックすると、値がtextview変更されます。
ボタンをクリックしながら値の値を変更しようとしましたが、クリックするたびにtexview最後の行の値が更新されます。textviewありがとうございます。
最後に、次の答えを得ました。
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));
}
}
}
ご支援ありがとうございます.....