Great, but some inconvenient.
Anyway, here is complete code.

class TemplateButton extends Button {
        public TemplateButton(String title){
            super(title);
        }
        @Override
        public void pointerReleased(int x, int y) {
            super.pointerReleased(x, y); //To change body of generated 
methods, choose Tools | Templates.
        }

        @Override
        public void pointerPressed(int x, int y) {
            super.pointerPressed(x, y); //To change body of generated 
methods, choose Tools | Templates.
        }

        @Override
        public void removeActionListener(ActionListener l) {
            super.removeActionListener(l); //To change body of generated 
methods, choose Tools | Templates.
        }

        @Override
        public void longPointerPress(int x, int y) {
            super.longPointerPress(x, y); //To change body of generated 
methods, choose Tools | Templates.
            //.............YOU CAN PUT YOUR CODE HERE............
        }
        
    }

On Friday, August 29, 2014 at 4:16:21 PM UTC+2, Shai Almog wrote:
>
> Derive the button and override the long press method. You won't get an 
> action event for long press outside of list.
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/f158028e-cbc6-4608-918e-519ea832dc2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to