table row long press

Posted by adoo42 on Stack Overflow See other posts from Stack Overflow or by adoo42
Published on 2011-11-19T17:16:01Z Indexed on 2011/11/19 17:51 UTC
Read the original article Hit count: 193

I have a table which is built dynamically based on how much data is present, if at all.

I want to be able to long press anywhere on a the table row to be able to get some options to delete or edit etc. Is this possible? Remember I need to do all this without setting any XML as its dynamically built.

Is this relevant to what I want to achieve?

` @override

public boolean onKeyLongPress(int keyCode, KeyEvent event) {

if (keyCode == KeyEvent.KEYCODE_BACK) 
{
    // do your stuff here
    return true;
}
return super.onKeyLongPress(keyCode, event);

} `

any advice is appreciated.

© Stack Overflow or respective owner

Related posts about android

Related posts about android-layout