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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:46:40+00:00 2026-06-11T10:46:40+00:00

I have done some research and found that it’s possible to have a progress

  • 0

I have done some research and found that it’s possible to have a progress bar in the expanded statusbar area but I am still not sure about whether the animation icon is possible or not.
I have tried the answer of this question: Animation in Notification bar Custom View. However, the icon is not animated.
If it’s not possible, could you point me to any documentation that confirms that?
Thanks in advance.

  • 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-11T10:46:41+00:00Added an answer on June 11, 2026 at 10:46 am

    The video in your referenced question (which I admit I didn’t see was the same as one of the links I gave) clearly shows an animated icon there. At about 0:35. http://www.youtube.com/watch?v=yNcs-sS2nFU&t=0m32s (this link jumps to that part). The arrow has a little black line move down through it repeatedly. Seems like animation to me. Is that what you want?

    Regardless, what Android version is that on? Maybe it’s something custom from T-Mobile, I don’t know, it’s just some video on YouTube.

    You can create a custom view for the notification, for example: http://www.roman10.net/android-custom-notification-with-progress-bar/ You might be able to use a similar idea with an animation drawable (same SO question again) where Roman10’s got the default android image.

    RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.noti);
    contentView.setImageViewResource(... your animated resource ...);
    

    Edit

    So in the end RemoteViews doesn’t support animation in the image resource as far as I can tell. But I figured out a way to work around that and it is possibly expensive, but I haven’t profiled it to see how the CPU usage is.

    I started with the code at roman10 (link above) and made a couple of modifications.

    yinyangAnim.xml + animation frame .png files

    <?xml version="1.0" encoding="utf-8"?>
    <animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false">
        <item android:drawable="@drawable/yinyang0" android:duration="150" />
        <item android:drawable="@drawable/yinyang1" android:duration="150" />
        <item android:drawable="@drawable/yinyang2" android:duration="150" />
        <item android:drawable="@drawable/yinyang3" android:duration="150" />
        <item android:drawable="@drawable/yinyang4" android:duration="150" />
        <item android:drawable="@drawable/yinyang5" android:duration="150" />    
    </animation-list>
    

    Add another thread creation to the start button click:

                 new Thread(new Runnable() {
                        public void run() {
                            int frameIndex = 0;
                            mRun = true;
                            while (mRun) {
                                ++frameIndex;
                                SystemClock.sleep(100);
                                BitmapDrawable frame = (BitmapDrawable) yinyangAnimation.getFrame(frameIndex);
                                noti.contentView.setImageViewBitmap(R.id.status_icon, frame.getBitmap());
                                nm.notify(STATUS_BAR_NOTIFICATION, noti);
                                if (frameIndex >= yinyangAnimation.getNumberOfFrames()-1) {
                                    frameIndex = 0;
                                }
                            }
    
                        }
                      }).start();
    

    Add to ProgressBarNotificationActivity.onCreate()

         ImageView yinyang = new ImageView(this);
         yinyang.setBackgroundResource(R.drawable.yinyang_anim);
         yinyangAnimation = (AnimationDrawable) yinyang.getBackground();
    

    And the private variable of course: private AnimationDrawable yinyangAnimation;

    Pressing the start button in the app and viewing the notification shows the spinning yin-yang for me. I got the yin-yang at loadinfo.net and split it using ImageMagick command line (ubuntu).

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

Sidebar

Related Questions

Have done some research and found some stuff that may be helpful. I would
I have done some research on the above and found that I am able
Ok I am still learning this... I have Googled and done some research but
I have done some research on this subject, and found out, that Gzipping and
Alright, I have done some research and found out that a good normalized articles
I have done some research prior to and have found some great articles but
So I have done some research and found out that MongoDB doesn't do fsync(),
I have done some research and found that I can use: string retUrl =
I have done some research, and majority of the examples I have found use
I have done some research and it really seems that implementing a transaction system

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.