I want to use mouse listener for table row, wants to use mouse button up and mouse button down button implementation.
A:
Judging from your recent questions I think you should be using a ListView
.
It will be easier to create a View
to display multi-column output inside a ListView
than it would be to re-implement ListView
on top of TableLayout
.
Dave Webb
2009-12-21 11:34:05
I fixed it by myself using public boolean onTouch(View v, MotionEvent event) { int viewId= v.getId(); if (event.getAction() == MotionEvent.ACTION_DOWN){ v.setBackgroundResource(R.drawable.pressed_application_background_static); }else if(event.getAction() == MotionEvent.ACTION_UP){ v.setBackgroundResource(R.color.white); handleEvent(viewId); }else{ v.setBackgroundResource(R.color.white); } return false; }
Faisal khan
2009-12-22 07:46:21
I'm glad you found the answer. Please post the solution as an answer the question and then accept it as other people finding your question might not find it in a comment.
Dave Webb
2009-12-24 06:52:21