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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:57:16+00:00 2026-05-27T17:57:16+00:00

This is my first app and i need to start new activity when the

  • 0

This is my first app and i need to start new activity when the animation ends. what do I need to do? My code:

package com.lineage.goddess;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.TextView;

public class LineageSplashActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
        startAnimation();
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); 

    }

    private void startAnimation() {
        // TODO Auto-generated method stub
        TextView logo1= (TextView) findViewById(R.id.TextView1);
        Animation fade1= AnimationUtils.loadAnimation(this, R.anim.fade_in);
        logo1.startAnimation(fade1);
        TextView logo2= (TextView) findViewById(R.id.TextView2);
        Animation fade2= AnimationUtils.loadAnimation(this, R.anim.fade_in);
        logo2.startAnimation(fade2);
        TextView logo3= (TextView) findViewById(R.id.TextView3);
        Animation fade3= AnimationUtils.loadAnimation(this, R.anim.fade_in);
        logo3.startAnimation(fade3);
        TextView logo4= (TextView) findViewById(R.id.TextView4);
        Animation fade4= AnimationUtils.loadAnimation(this, R.anim.fade_in2);
        logo4.startAnimation(fade4);}
         public void onAnimationEnd() {
             Intent i = new Intent( LineageSplashActivity.this, LineageMenuActivity.class );
             LineageSplashActivity.this.startActivity( i );
;
        }
    }
  • 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-27T17:57:17+00:00Added an answer on May 27, 2026 at 5:57 pm

    Set an AnimationListener to the animation you want to use to start your Activity.

    myAnimation.setAnimationListener(new AnimationListener() {
        public void onAnimationStart(Animation animation) {}
        public void onAnimationRepeat(Animation animation) {}
        public void onAnimationEnd(Animation animation) {
            Intent i = new Intent( LineageSplashActivity.this, LineageMenuActivity.class );
            LineageSplashActivity.this.startActivity( i );
        }
    }
    

    So, your code will be like this:

    package com.lineage.goddess;
    
    import android.app.Activity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.view.WindowManager;
    import android.view.animation.Animation;
    import android.view.animation.AnimationUtils;
    import android.widget.TextView;
    
    public class LineageSplashActivity extends Activity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.splash);
            startAnimation();
            getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); 
    
        }
    
        private void startAnimation() {
            // TODO Auto-generated method stub
            TextView logo1= (TextView) findViewById(R.id.TextView1);
            Animation fade1= AnimationUtils.loadAnimation(this, R.anim.fade_in);
            logo1.startAnimation(fade1);
            TextView logo2= (TextView) findViewById(R.id.TextView2);
            Animation fade2= AnimationUtils.loadAnimation(this, R.anim.fade_in);
            logo2.startAnimation(fade2);
            TextView logo3= (TextView) findViewById(R.id.TextView3);
            Animation fade3= AnimationUtils.loadAnimation(this, R.anim.fade_in);
            logo3.startAnimation(fade3);
            TextView logo4= (TextView) findViewById(R.id.TextView4);
            Animation fade4= AnimationUtils.loadAnimation(this, R.anim.fade_in2);
            face4.setAnimationListener(new AnimationListener() {
                public void onAnimationStart(Animation animation) {}
                public void onAnimationRepeat(Animation animation) {}
                public void onAnimationEnd(Animation animation) {
                    Intent i = new Intent( LineageSplashActivity.this, LineageMenuActivity.class );
                    LineageSplashActivity.this.startActivity( i );
                }
            }    
    
            logo4.startAnimation(fade4);    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first app with CI and I want to know whether $_POST
Okay this is a fairly broad question. This is my first App and I'm
This is my first winform app in .NET... I have made a couple of
This is my first question :). Im writing a little twitter app in PHP
First as a note I am using this plugin in a Rails app. Ok
I'm creating an asp.net MVC app, first time I've done this. I have a
Saw this piece of code in a Ruby on Rails book. This first one
i have a button to close my app with this code: finish(); the problem
First off, let me start by saying, I know this exact question has been
I need to do the following: when app is started it runs an activity

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.