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 6708411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:45:22+00:00 2026-05-26T07:45:22+00:00

I have a button and while this button is playing an animation, I’m not

  • 0

I have a button and while this button is playing an animation, I’m not able to click on button. I’ve set click listener and touch listener but in debug mode it’s not entering in OnClick and in onTouch methods. Do you know why? Thanks

edit: I’ve tried something like:

        AsyncTask task = new AsyncTask() {

        @Override
        protected Object doInBackground(Object... objects) {
            button1.setOnClickListener(new View.OnClickListener() {

                public void onClick(View view) {
                    Toast toast = Toast.makeText(MyActivity.this, button1.getText(), Toast.LENGTH_SHORT);
                    toast.show();
                }
            });
            return null;
        }

        ;
    };
    task.execute(button1);

but it’s not working

Edit: here is the full source code

  • 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-26T07:45:23+00:00Added an answer on May 26, 2026 at 7:45 am

    Before Android 3.0, using any of the animation classes only changes where the view is drawn – it won’t adjust its touchable-bounds during (or after) the animation:
    http://android-developers.blogspot.com/2011/02/animation-in-honeycomb.html

    You could:

    • Make a ViewGroup which moves its children every onDraw
    • Override your View’s onDraw to move itself – Could use margin or padding, or position (if view is in a FrameLayout or something similar).
    • Only use 3.0+ devices
    • Override the parent’s onTouch (or onInterceptTouchEvent), calculate where the View is being drawn (you can get how far into and the offset from real position from the Animation *) and handle accordingly… * Looking at your code (since you generate a random direction each time it finishes), this might not be possible without tracking which directions you’ve previously take..
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been playing with this for a while, but the closest I have
I have a button 'button' that activates a dropdown box 'box': $('.button').click(function() { $(this).siblings(.box).toggle();
I have one issue with UInavigationcontroller In my firstview i have button.If i click
We have a button that saves asynchronously using AjaxToolKit/C#/.NET. I'm getting this in my
i have asp button like this: <asp:Button ID=ImportToDB runat=server OnClick=ImportToDB_Click /> And i need
Strange Question i guess but i have this bit of code in my page...
Ok well I have been fighting with this for a while now and have
I am not new to Flash but I have not properly used it for
I have been playing round with the Async CTP this morning and have a
i've been playing with MVC for a while now, but since the project i'm

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.