後で何かをするために行を選択する必要があるテーブルレイアウトがあります。問題は、スクロールすると新しい行が選択されることです。スクロールしたいだけのときに行を選択しないようにしたい
行を選択するために私が持っているのはこれです:
...
TableRow tR = new TableRow(this);
final TableLayout tabela = (TableLayout)findViewById(R.id.tableLayout1);
...
tR.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View arg0, MotionEvent arg1) {
tabela.getFocusedChild().setBackgroundResource(R.drawable.gray1);//remove the old selected row
arg0.requestFocus(); //add new one
arg0.setBackgroundColor(Color.parseColor("#FFFF00")); //add new one
return false;
}});
その「MotionEvent arg1」と関係があると思いますが、どうすればよいかわかりません。よろしくお願いいたします。