Hi,
See an interface "OnTouchListener" and to avoid selecting a cell on
scrolling make use you catch an event of
public boolean onTouch(View v, MotionEvent arg1) {
switch (arg1.getAction()) {
case MotionEvent.ACTION_UP:
instead of
public boolean onTouch(View v, MotionEvent arg1) {
switch (arg1.getAction()) {
case MotionEvent.ACTION_DOWN:
2011/7/21 RLScott <[email protected]>
> I need to make a table of 12 rows and 7 columns contained in a scroll
> view. That I can do. But in addition I want to be able to detect a
> touch on any cell and dynamically alter the appearance of that cell
> (sort of like a Select). I know that table views do not support
> selection like a list view does. But I would like to implement my own
> Select functionality in this scrolling table by changing the
> background color of the selected cell. That I also know how to do,
> once I figure out how to detect the touch. One problem might be that
> the user needs to touch the cells in order to affect a scroll. That
> is OK in my app if the touched cell also gets selected in the
> process. But in the iPhone I was able to implement this same
> scrolling selectable table and the iOS was able to distinguish between
> a touch for scrolling purposes and a touch that did not scroll. So
> scrolling the table did not result in a select of the cell being
> touched. But as I said it would be OK if I can't make that
> distinction in Android. I just want to know what API I can use to
> detect a touch in any cell of a scrolling table view.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en