TableRowを次のように膨らませます。
final TableRow tr1 = (TableRow)LayoutInflater.from(this).inflate(R.layout.attrib_row_survey, null);
tr1.setOnTouchListener(this);
tl1.addView(tr1);
これが私のカウンターのやり方です:
new CountDownTimer(30000, 1000) {
public void onTick(long millisUntilFinished) {
((TextView)tr1.findViewById(R.id.textView2)).setText("Seconds Remaining: " + millisUntilFinished / 1000);
}
public void onFinish() {
((TextView)tr1.findViewById(R.id.textView2)).setText("DONE");
}
}.start();
問題は、このタイマーを実行して行に表示すると、UIが非常に遅くなり、タイマーが遅れることです。onTouchListener()でview.setBackGroundColor(Color.BLACK)を実行してクリックすると、遅れます。