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

  • Home
  • SEARCH
  • 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 8065565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:42:27+00:00 2026-06-05T11:42:27+00:00

I am building an Android application and I want to create a progress bar

  • 0

I am building an Android application and I want to create a progress bar very much like what is seen at the bottom of the MIUI File Explorer (multiple segments with different colors):

MIUI File Explorer App

There is no completely obvious solution as far as I can tell.
So far what I can think of is

  • Layering many progress bars with transparent backgrounds on top of one another
  • Extend the Progress bar class to take multiple values and rewrite the onDraw method

I think the first option would be far too slow and inefficient but the second option might be overly complex but is definitely the better solution.

Is there any better way of going about this?

  • 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-05T11:42:30+00:00Added an answer on June 5, 2026 at 11:42 am

    you should make a custom view for it. Example:

    final Paint blue = new Paint();
    blue.setColor(Color.BLUE);
    
    View progressBar = new View(getActivity()){
    
            protected void onDraw(android.graphics.Canvas canvas) {
    
                canvas.drawRect(0,0,getWidth()*progressPecentFirst,getHeight(),blue);
                blue.setColor(Color.RED);
                canvas.drawRect(0,0,getWidth()*progressPecentSecond,getHeight(),blue);
                //Repeat this
            };
        };
    parentLayout.addView(progressBar);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building an android application for Ice Cream Sandwich. I want in my
I am building a application for the Android platform and I would like to
I am building an application for Android, I want to keep it an Android
I want to create an application that will target old Android platforms (>= 2.x).
i'm building an android application which i want all the user of the application
I am building an android application and want to know if there is a
So I'm building an android application, I want the users to be able to
I want to create a rate system for an android application using java. Ive
I'm building a radio application on android , I want know how to make
As part of an application I'm building, I want to publish an audio file

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.