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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:36:19+00:00 2026-05-23T07:36:19+00:00

long time listener, first time caller… I am creating a splash screen derived from

  • 0

long time listener, first time caller…

I am creating a splash screen derived from Activity called SplashBase that is placed inside a shared project. The layout is the following:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   android:id="@+id/linlytSplash"
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
>
   <ImageView
      android:id="@+id/imgvwSplash"
      android:src="@drawable/splashscreen"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
   ></ImageView>

   <LinearLayout
      android:id="@+id/linlytProgress"
      android:orientation="horizontal"
      android:layout_width="wrap_content"
      android:layout_height="fill_parent"
      android:layout_gravity="center"
      android:gravity="center"
   >
      <ProgressBar
         android:id="@+id/progbarProgress"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginRight="5dp"
      ></ProgressBar>
      <TextView
         android:id="@+id/txtvwProgress"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginLeft="10dip"
         android:gravity="center_vertical"
         android:text="@string/loading_ellipsis"
         android:textStyle="bold"
      ></TextView>

   </LinearLayout>

</LinearLayout>

I am loading the animations like this :

  Animation animation = AnimationUtils.loadAnimation(this, R.anim.splashscreen_anim);
  animation.setAnimationListener(new AnimationListener() {
     public void onAnimationEnd(Animation animation) {
        // Advance to the next screen.
        if (null != m_intentToLaunch) {
           startActivity(m_intentToLaunch);
        }

        finish();
     }
  });

  animation.setStartTime(AnimationUtils.currentAnimationTimeMillis() + 1000);

I have a derived class called Splash which lives in my main project.

I’ve had this splash screen for a long time now, the animation has always worked. My ImageView is shown for 2 seconds, and then animates and disappears before calling finish() and loading the next Activity.

I am now adding a ProgressBar which only be shown for the first second (not exactly, but it’s clearer if I explain it that way). For some reason, after I hide the ProgressBar, the animation no longer works on the ImageView. When I call

findViewById(R.id.linlytProgress).setVisibility(View.INVISIBLE);

the animation no longer works. In order to test I have placed the following calls:

findViewById(R.id.txtvwProgress).setVisibility(View.INVISIBLE);

and then

findViewById(R.id.progbarProgress).setVisibility(View.INVISIBLE);

When I hide only the TextView, things work as expected. When I hide the ProgressBar, boom, my ImageView no longer animates. I’m at a loss.

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

    I finally found the answer to my own question. The view needed to be invalidated.

    findViewById(R.id.imgvwSplash).invalidate();
    

    et voila! It works exactly as expected, and so far on every platform that I tried it on.

    Thanks to everyone who took a look at the question.

    -I_Artist

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

Sidebar

Related Questions

Long time listener, first time caller. I'm a full time SE during the day
Hey, long time listener first time caller, and I'm asking a question related to
long time listener. First time caller... Not strictly a PHP question as it involves
Hey Overflow. Long time listener, first time caller. So here's what I've got: I'm
Long time listener, first time caller. Does anyone know of a good interop library
As they say on the radio - long time listener first time caller.... Here's
long-time listener, first-time caller! I’m trying to connect to MySQL using the ADO.NET Entity
Long time listener - first time caller. I am hoping to get some advice.
Long time listener, first time caller… I've got two questions in a form, the
long-time listener, first-time caller. I am relatively new to programming and was looking back

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.