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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:37:31+00:00 2026-05-25T14:37:31+00:00

By default in Android 3.0+, when ActionBar.hide()/show() are called the bar is animated with

  • 0

By default in Android 3.0+, when ActionBar.hide()/show() are called the bar is animated with a brief fade in/out animation.

There does not seem to be an XML style attribute in this list associated with an animation resource.

Is there some way to change this animation? In my case, I simply want to change the animation time, but is it also possible to have a sliding animation?

  • 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-25T14:37:31+00:00Added an answer on May 25, 2026 at 2:37 pm

    No.

    At least not in 3.0, 3.1, or 3.2. If you look at the decompiled sources of com.android.internal.app.ActionBarImpl you’ll find that the animations are hard-coded.

    E.g., from 3.2:

    .method public hide()V
        .locals 8
    
        .prologue
        const/4 v5, 0x0
    
        const/4 v7, 0x0
    
        const/4 v6, 0x1
    
        .line 529
        iget-object v2, p0, Lcom/android/internal/app/ActionBarImpl;->mCurrentAnim:Landroid/animation/Animator;
    
        if-eqz v2, :cond_0
    
        .line 530
        iget-object v2, p0, Lcom/android/internal/app/ActionBarImpl;->mCurrentAnim:Landroid/animation/Animator;
    
        invoke-virtual {v2}, Landroid/animation/Animator;->end()V
    
        .line 532
        :cond_0
        iget-object v2, p0, Lcom/android/internal/app/ActionBarImpl;->mContainerView:Lcom/android/internal/widget/ActionBarContainer;
    
        invoke-virtual {v2}, Lcom/android/internal/widget/ActionBarContainer;->getVisibility()I
    
        move-result v2
    
        const/16 v3, 0x8
    
        if-ne v2, v3, :cond_1
    
        .line 553
        :goto_0
        return-void
    
        .line 536
        :cond_1
        iget-boolean v2, p0, Lcom/android/internal/app/ActionBarImpl;->mShowHideAnimationEnabled:Z
    
        if-eqz v2, :cond_3
    
        .line 537
        iget-object v2, p0, Lcom/android/internal/app/ActionBarImpl;->mContainerView:Lcom/android/internal/widget/ActionBarContainer;
    
        const/high16 v3, 0x3f80
    
        invoke-virtual {v2, v3}, Lcom/android/internal/widget/ActionBarContainer;->setAlpha(F)V
    
        .line 538
        iget-object v2, p0, Lcom/android/internal/app/ActionBarImpl;->mContainerView:Lcom/android/internal/widget/ActionBarContainer;
    
        invoke-virtual {v2, v6}, Lcom/android/internal/widget/ActionBarContainer;->setTransitioning(Z)V
    
        .line 539
        new-instance v0, Landroid/animation/AnimatorSet;
    
        invoke-direct {v0}, Landroid/animation/AnimatorSet;-><init>()V
    
        .line 540
        .local v0, anim:Landroid/animation/AnimatorSet;
        iget-object v2, p0, Lcom/android/internal/app/ActionBarImpl;->mContainerView:Lcom/android/internal/widget/ActionBarContainer;
    
        const-string v3, "alpha"
    
        new-array v4, v6, [F
    
        aput v5, v4, v7
    
        invoke-static {v2, v3, v4}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;
    
        move-result-object v2
    
        invoke-virtual {v0, v2}, Landroid/animation/AnimatorSet;->play(Landroid/animation/Animator;)Landroid/animation/AnimatorSet$Builder;
    
        move-result-object v1
    
        .line 541
        .local v1, b:Landroid/animation/AnimatorSet$Builder;
        iget-object v2, p0, Lcom/android/internal/app/ActionBarImpl;->mContentView:Landroid/view/View;
    
        if-eqz v2, :cond_2
    
        .line 542
        iget-object v2, p0, Lcom/android/internal/app/ActionBarImpl;->mContentView:Landroid/view/View;
    
        const-string/jumbo v3, "translationY"
    
        const/4 v4, 0x2
    
        new-array v4, v4, [F
    
        aput v5, v4, v7
    
        iget-object v5, p0, Lcom/android/internal/app/ActionBarImpl;->mContainerView:Lcom/android/internal/widget/ActionBarContainer;
    
        invoke-virtual {v5}, Lcom/android/internal/widget/ActionBarContainer;->getHeight()I
    
        move-result v5
    
        neg-int v5, v5
    
        int-to-float v5, v5
    
        aput v5, v4, v6
    
        invoke-static {v2, v3, v4}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;
    
        move-result-object v2
    
        invoke-virtual {v1, v2}, Landroid/animation/AnimatorSet$Builder;->with(Landroid/animation/Animator;)Landroid/animation/AnimatorSet$Builder;
    
        .line 544
        iget-object v2, p0, Lcom/android/internal/app/ActionBarImpl;->mContainerView:Lcom/android/internal/widget/ActionBarContainer;
    
        const-string/jumbo v3, "translationY"
    
        new-array v4, v6, [F
    
        iget-object v5, p0, Lcom/android/internal/app/ActionBarImpl;->mContainerView:Lcom/android/internal/widget/ActionBarContainer;
    
        invoke-virtual {v5}, Lcom/android/internal/widget/ActionBarContainer;->getHeight()I
    
        move-result v5
    
        neg-int v5, v5
    
        int-to-float v5, v5
    
        aput v5, v4, v7
    
        invoke-static {v2, v3, v4}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;
    
        move-result-object v2
    
        invoke-virtual {v1, v2}, Landroid/animation/AnimatorSet$Builder;->with(Landroid/animation/Animator;)Landroid/animation/AnimatorSet$Builder;
    
        .line 547
        :cond_2
        iget-object v2, p0, Lcom/android/internal/app/ActionBarImpl;->mHideListener:Landroid/animation/Animator$AnimatorListener;
    
        invoke-virtual {v0, v2}, Landroid/animation/AnimatorSet;->addListener(Landroid/animation/Animator$AnimatorListener;)V
    
        .line 548
        iput-object v0, p0, Lcom/android/internal/app/ActionBarImpl;->mCurrentAnim:Landroid/animation/Animator;
    
        .line 549
        invoke-virtual {v0}, Landroid/animation/AnimatorSet;->start()V
    
        goto :goto_0
    
        .line 551
        .end local v0           #anim:Landroid/animation/AnimatorSet;
        .end local v1           #b:Landroid/animation/AnimatorSet$Builder;
        :cond_3
        iget-object v2, p0, Lcom/android/internal/app/ActionBarImpl;->mHideListener:Landroid/animation/Animator$AnimatorListener;
    
        const/4 v3, 0x0
    
        invoke-interface {v2, v3}, Landroid/animation/Animator$AnimatorListener;->onAnimationEnd(Landroid/animation/Animator;)V
    
        goto :goto_0
    .end method
    

    UPDATE

    Same goes for ICS and JellyBean

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

Sidebar

Related Questions

By default Android NDK does not generate code with VFP (vector floating point) or
I've implemented the action bar found here https://github.com/johannilsson/android-actionbar and it works beautifully. However, I've
How to make android EditText smaller than default in height? If I change the
When you createa a PreferenceScreen on Android, your application creates a default SharedPreferences file
I'm trying to record audio this.recorder = new android.media.MediaRecorder(); this.recorder.setAudioSource(android.media.MediaRecorder.AudioSource.MIC); this.recorder.setOutputFormat(android.media.MediaRecorder.OutputFormat.DEFAULT); this.recorder.setAudioEncoder(android.media.MediaRecorder.AudioEncoder.DEFAULT); this.recorder.setOutputFile(pruebaAudioRecorder.mp4); **this.recorder.prepare();**
By default android checkbox shows text at right side and checkbox at left I
I want to have the default android browser be able to download files of
Possible Duplicate: Sending Email in Android using JavaMail API without using the default android
Hi there I am trying to create a bug-free jquerymobile app across Android Browser,
I'm looking for a way to launch the default android launcher programatically, something perhaps

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.