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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:58:31+00:00 2026-06-10T16:58:31+00:00

In my android app I try to implement my own progressbar like in some

  • 0

In my android app I try to implement my own progressbar like in some other apps. So if my customer click on a button the the refresh image is replaced with a rotating circle. But my circle is not rotating.
I add my rotating circle in the xml layout to test the rotating xml.

<ImageView android:layout_gravity="center_vertical" android:contentDescription="@string/liga" android:layout_height="40dp" android:layout_width="40dp" android:clickable="true" android:id="@+id/iv_refresh" android:src="@drawable/progress_medium_holo" ></ImageView>

This ist my rotating xml:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <rotate
             android:drawable="@drawable/spinner_48_outer_holo"
             android:pivotX="50%"
             android:pivotY="50%"
             android:fromDegrees="0"
             android:toDegrees="1080" />
    </item>
    <item>
        <rotate
             android:drawable="@drawable/spinner_48_inner_holo"
             android:pivotX="50%"
             android:pivotY="50%"
             android:fromDegrees="720"
             android:toDegrees="0" />
    </item>
</layer-list>
  • 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-10T16:58:31+00:00Added an answer on June 10, 2026 at 4:58 pm

    I had a similar problem and did not really understand baeckerman83 solution. After poking around in the source code it seems the Progress bar animates its drawables with setLevel. If you are still adamant on using the progressbar heres what I did:

    ...
    ((ImageView)findViewById(R.id.image_view)).setImageResource(R.id.progress_large_holo)
    ...
    @Override
    protected void onDraw (Canvas canvas) {
        LayerDrawable ld= (LayerDrawable)((ImageView)findViewById(R.id.image_view)).getDrawable();
        for (int i=0; i<ld.getNumberOfLayers(); i++) {
            // Really slow
            ld.getDrawable(i).setLevel((int) (System.currentTimeMillis() % 10000));
        }
        super.onDraw(canvas);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have android device with root and i try to implement some small app.
I am building a android-based app to implement twitter search function. The button click
I need to implement Sentry for my android app, I try to find an
I try to develop an Android app. I already managed to implement a rather
My android app project need to add a new function of saving the click
I'm trying to implement async on Android but it keeps crashing my app, the
I am going to implement camera feature for my android app.for this, I searched
Im building my own android app, but im kinda stuck at the login part.
I've been developing an app for android and iphone, and been able to implement
When I try to implement Facebook Connect in my Android application, I get the

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.