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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:30:14+00:00 2026-06-15T02:30:14+00:00

I made a theme with a custom animation (slide up and slide down). The

  • 0

I made a theme with a custom animation (slide up and slide down).
The animation works fine on the older android versions..
However, when I try it out on Android 4.0 (ICS) the on close animation doesn’t work. Only the slide up animation works fine on ICS.

Here is my theme I use for the animation:

<style name="myTheme" parent="android:Theme.Black">
    <item name="android:windowTitleSize">45dip</item>
    <item name="android:windowTitleBackgroundStyle">@style/CustomWindowTitleBackground</item>
    <item name="android:windowAnimationStyle">@style/myTheme.Window</item>
</style>

<style name="myTheme.Window" parent="@android:style/Animation.Activity">
    <item name="android:activityOpenEnterAnimation">@anim/push_up_in_no_alpha</item>
    <item name="android:activityOpenExitAnimation">@anim/no_anim</item>
    <item name="android:activityCloseEnterAnimation">@anim/no_anim</item>
    <item name="android:activityCloseExitAnimation">@anim/push_down_out_no_alpha</item>
</style>

And here is push_down_out_no_alpha.xml:

<set xmlns:android="http://schemas.android.com/apk/res/android">
        <translate android:fromYDelta="0" android:toYDelta="100%p"
        android:duration="@android:integer/config_longAnimTime"/>
</set>

When i set a animation in code it also works fine on ICS, but why not as a theme?

 this.overridePendingTransition(R.anim.no_anim,R.anim.push_down_out_no_alpha);

Does anyone know why it isn’t working on Android 4.0 (ICS)?

  • 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-06-15T02:30:16+00:00Added an answer on June 15, 2026 at 2:30 am

    Specifying animations from the manifest appears to be broken in ICS 🙁
    The override animation solution works fine, but you probably don’t want to hard-code the animations. It would be nice to get them from the manifest as you would for other versions of the platform.. so….

    add a couple of member fields to your activity to hold the ids of the animations attached to your activity..

    protected int activityCloseEnterAnimation;
    protected int activityCloseExitAnimation;
    

    and somewhere in your onCreate…

    // Retrieve the animations set in the theme applied to this activity in the
    // manifest..
    TypedArray activityStyle = getTheme().obtainStyledAttributes(new int[] {android.R.attr.windowAnimationStyle});
    int windowAnimationStyleResId = activityStyle.getResourceId(0, 0);      
    activityStyle.recycle();
    
    // Now retrieve the resource ids of the actual animations used in the animation style pointed to by 
    // the window animation resource id.
    activityStyle = getTheme().obtainStyledAttributes(windowAnimationStyleResId, new int[] {android.R.attr.activityCloseEnterAnimation, android.R.attr.activityCloseExitAnimation});
    activityCloseEnterAnimation = activityStyle.getResourceId(0, 0);
    activityCloseExitAnimation = activityStyle.getResourceId(1, 0);
    activityStyle.recycle();
    

    then wherever your activity finishes/should apply animation include…

    overridePendingTransition(activityCloseEnterAnimation, activityCloseExitAnimation);
    

    and your activities should correctly honour the animations you set in the theme/style attached to activities in your manifest.

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

Sidebar

Related Questions

I've made a custom Wordpress theme and when I try to activate certain plugins
I have made a custom module and it works fine till I start working
So I've just made a custom post type for my wordpress theme named Products.
I made a custom DatePicker that extends the android DatePicker UI component. I needed
I am trying to assign the Holo theme to a custom button I made
I made a custom viewgroup, and I need to use view animation to rotate
I have made a custom Magento theme by heavily customizing the base. I've made
<style name=CustomTheme parent=@android:style/Theme.Holo.Light> I made my own theme and added a reference to it
I am working on one project. In that I made one custom theme which
I have a custom module I made for Magento. From the admin, there is

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.