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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:45:11+00:00 2026-05-18T04:45:11+00:00

I have a widget which starts an activity when it is clicked. I’d like

  • 0

I have a widget which starts an activity when it is clicked. I’d like to have some kind of fancy animation to display this activity, rather than the standard scroll-from-right of Android. I’m having problems setting it, though. This is what I have:

slide_top_to_bottom.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator">
    <translate android:fromYDelta="-100%" android:toXDelta="0" android:duration="100" />
    <alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="50" />
</set>

…which is referenced in anim.xml

<?xml version="1.0" encoding="utf-8"?>
<layoutAnimation xmlns:android="http://schemas.android.com/apk/res/android"
        android:delay="50%"
        android:animation="@anim/slide_top_to_bottom" />

But then where do I reference it from? I’ve tried both the base element of the activity I want to slide in, and the activitiy’s entry in the manifest, both times with

android:layoutAnimation="@+anim/anim"

I might be doing this all wrong. Any help is much appreciated!

  • 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-18T04:45:11+00:00Added an answer on May 18, 2026 at 4:45 am

    You can create a custom Theme with a reference to your own animation and apply it to your Activity in your manifest file.
    I was successful in applying a custom animation for a floating window using the following style definition. You might be able to do something similar if you set the parent of your style to be “@android:style/Animation.Activity”

    Look at the following files for further details on what you can override.

    https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/styles.xml
    https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/themes.xml

    Here’s my a portion of my styles.xml and manifest.xml

    styles.xml

    <style name="MyTheme" parent="@android:style/Theme.Panel">
        <item name="android:windowNoTitle">true</item>
        <item name="android:backgroundDimEnabled">true</item>
        <item name="android:windowAnimationStyle">@style/MyAnimation.Window</item>
    </style>
    
    <!-- Animations --> 
    <style name="MyAnimation" /> 
    
    <!-- Animations for a non-full-screen window or activity. --> 
    <style name="MyAnimation.Window" parent="@android:style/Animation.Dialog"> 
        <item name="android:windowEnterAnimation">@anim/grow_from_middle</item>
        <item name="android:windowExitAnimation">@anim/shrink_to_middle</item>
    </style> 
    

    Manifest.xml

        <activity
            android:name="com.me.activity.MyActivity"
            android:label="@string/display_name"
            android:theme="@style/MyTheme">
        </activity>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a widget which I'm putting in a QVBoxLayout. This widget's layout is
I have a JavaScript widget which provides standard extension points. One of them is
I have a K* window, and within it, a widget which needs the events
I am using a fictional example for this. Say, I have a Widget class
I have this code: #!/usr/bin/perl use strict; use Tkx; my $mw = Tkx::widget->new('.'); $mw->g_wm_minsize(
I have a widget layout xml which sets the src to the delivered android
Let's say we have a object called a Widget, for which we can construct
i have a input tag which is non editable, but some times i need
Let's say that I have a widget that displays summary information about how many
I have a UI widget that needs to be put in an IFRAME both

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.