Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6042481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:47:42+00:00 2026-05-23T06:47:42+00:00

In my Application I have a simple image switcher and 2 buttons(Next and Previous)

  • 0

In my Application I have a simple image switcher and 2 buttons(Next and Previous) at the bottom of screen to switch images. Also I set animation to image switcher with duration 700. So when i click “Next” button firstly I disable next button, and than set to Clickable with delay with the same duration…because i need animation to be finished.

public void onNextButtonPressed(View view) {
    setPreviousAndNextButtonsClickable(false);
    setPeviousAndNextButtonsClickableWithDuration();
}

private void setPeviousAndNextButtonsClickableWithDuration() {
Handler mHandler = new Handler();
    mHandler.postDelayed(new Runnable() {
        public void run() {
            setPreviousAndNextButtonsClickable(true);
        }
    }, 700);
}

 private void setPreviousAndNextButtonsClickable(boolean clicable) {
    nextButton.setClickable(clicable);
    previousButton.setClickable(clicable);
}

And now about my problem…When I click next button very faster, some time button can click two times with out delay…Looks like i can click faster than button.setCkickable() method work… What is the problem ? Can it be because of device ? I’m trying that on HTS with android 2.2 where I reproduce a bug…and also on android 2.3.4 where i cannot reproduce that…Is that because device is slow or something wrong in my code ? thanks…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:47:43+00:00Added an answer on May 23, 2026 at 6:47 am
     public final boolean postDelayed (Runnable r, long delayMillis)
    

    delayMillis The delay (in milliseconds) until the Runnable will be executed.
    Returns

    I think your button gets enabled in 700 ms and that’s a very small duration and that’s why you are facing this issue.

    Try increasing the delay and see.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple OpenGL application where I have 2 objects displayed on screen:
In my application,I have to load volumedata from set of images (MRC images) and
I have a very simple image processing application. I am trying to remove the
I have a simple application that shows the user an image (in a UIImageView)
I have a simple wpf application WIA .My app has an image control... I
I have a simple WPF application where I display one very large image (9000x2875)
I have a simple application which sends an image (Base64 encoded) to a server,
I have simple WinForms application where modifying Windows Registry. The problem is that in
I have a simple application with the following code: FileInfo[] files = (new DirectoryInfo(initialDirectory)).GetFiles();
I have a simple application using netbeans for developing and maven for building et

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.