I have a tablelayout where I need to select a row to do something with it latter. The problem is, when I scroll it selects a new row. What I want it a way to not select a row when I only want to scroll
What I have for selecting a row is this:
...
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;
}});
I think It' something to do with that "MotionEvent arg1" but I dont really know what to do with it. Thanks in advance for your help