Listening to the long click events

suggest change

To catch a long click and use it you need to provide appropriate listener to button:

View.OnLongClickListener listener = new View.OnLongClickListener() {
    public boolean onLongClick(View v) {
        Button clickedButton = (Button) v;
        String buttonText = clickedButton.getText().toString();
        Log.v(TAG, "button long pressed --> " + buttonText);
        return true;


Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents