My LongClickListener doesnt works as i want.

0 Минко Василев · January 3, 2015
Hello guys,
This is mine code : 
        mycoolButton.setOnLongClickListener(
                new Button.OnLongClickListener(){
                    public boolean onLongClick(View v){
                        mycoolButton.setText("OK! ENOUGH,ENOUGH! LEAVE ME! ");
                        return false;
                    }
                }
        );

The action i want to do is when the user hold the button for a while the buttons text change to "OK! ENOUGH,ENOUGH! LEAVE ME! " and then , when he drop it the button text to come back as the original - "Click me"

Thanks!
M.V.

Post a Reply

Replies

Oldest  Newest  Rating
0 Минко Василев · January 5, 2015
It is not what i exactly looking for but after all i have to tell you thanks about the work.
Have a great day.
  • 1

Java / Android Development

103,781 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator