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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:38:21+00:00 2026-06-13T19:38:21+00:00

I want to create a progress bar as specified in the image. I’ve very

  • 0

I want to create a progress bar as specified in the image. I’ve very little idea about how to create a custom view. I checked a lot of tutorials, but couldn’t find a starting point. I’ve no images regarding the progressbar. I’m supposed to draw it. I tried overriding the ondraw method, but I was unable to get the exact look.

Here is the image : image

Thanks for your help

  • 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-13T19:38:22+00:00Added an answer on June 13, 2026 at 7:38 pm

    First off, you will only need one image of your loading arcs as they are replicable.

    http://developer.android.com/guide/topics/ui/custom-components.html

    public class CustomView extends View 
    {
    public CustomView(Context context) 
    {
        super(context);
    }
    
    protected void onDraw(Canvas canvas)
    {
        canvas.drawBitmap(REFERENCETIBITMAPHERE, 0, 0, null);
    }
    
    @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) 
     {
        setMeasuredDimension(measureWidth(widthMeasureSpec), measureHeight(heightMeasureSpec));
     }
    
    private int measureWidth(int measureSpec)
    {
        int preferred = REFERENCETIBITMAPHERE.getWidth();
        return getMeasurement(measureSpec, preferred);
    }
    
    private int measureHeight(int measureSpec)
    {
        int preferred = REFERENCETIBITMAPHERE.getHeight();
        return getMeasurement(measureSpec, preferred);
    }
    
    private int getMeasurement(int measureSpec, int preferred)
    {
        int specSize = MeasureSpec.getSize(measureSpec);
        int measurement = 0;
    
        switch(MeasureSpec.getMode(measureSpec))
      {
        case MeasureSpec.EXACTLY:
            measurement = specSize;
            break;
        case MeasureSpec.AT_MOST:
            measurement = Math.min(preferred, specSize);
            break;
        default:
            measurement = preferred;
            break;
      }
        return measurement;
    }
    }
    

    You will need to create your own method to receive some sort of value indicating the loading progress, and then redraw accordingly.

    For example:

    protected void onDraw(Canvas canvas)
    {
        // Where loadProgress is an int of some sort.
        for(int i = 0; i < loadProgress; i++)
        {
            canvas.drawBitmap(REFERENCETIBITMAPHERE, REFERENCEBITMAPHERE.getWidth() * i, 0, null);
        }
    }
    

    I hope this helps. =)

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

Sidebar

Related Questions

I want to create a progress bar like in the below image: I have
I want to create a custom seekbar, whose progress bar's colour change between red
All, I want to crate an rich looking, custom progress bar for blackberry touch
In my PHP web site, i want to create a file uploading progress bar.
I want to create loading progress bar when my activity is starting. I have
I want to create a stylish progress bar like this and i want to
I have a huge stored procedure and I want to create a progress bar
I want create a loading progress bar like Gmail in center and top of
I am building an Android application and I want to create a progress bar
I want to create my own progress bar using titanium instead of using 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.