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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:16:30+00:00 2026-06-06T10:16:30+00:00

i’d like to use a seekbar to show the current value and adjust the

  • 0

i’d like to use a seekbar to show the current value and adjust the desired value. I managed to change the desired value via thumb (Progress) and the current value with the bar (SecondaryProgress). There is only one little bug/problem:

When SecondaryProgress becomes lower than Progress, the bar shows the same value as Progress, even the value of SecondaryProgress really becomes lower or even 0 (checked that in debugger).

What it should look like:

SecondaryProgress < Progress   <-- doesnt work, shows: 
(====   O    )                               (=======O    )

SecondaryProgress == Progress   <-- works
(=======O    )

SecondaryProgress > Progress   <-- works
(=======O==  )

Is there a setting that enables me to adjust that? Or do I have to customize the seekbar? And if so, where should i start? For me this doesnt look like a thing i can do in Layout…

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-06T10:16:32+00:00Added an answer on June 6, 2026 at 10:16 am

    Might be a bit late, but the best solution I found to that problem is to customize the seekBar, and to use a secondary progress drawable that would use only a part of the height of the seekBar.

    Let’s say, for instance, that we want to use the bottom of the draw for the secondary progress, and keep 10dip at the top of it for progress. We could use the code below as progress drawable for our seekBar :

        <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
      <item android:id="@android:id/background">
        <shape>
           <corners android:radius="5dip" />
           <gradient
            android:startColor="#ffffffff"
            android:centerColor="#ffdddddd"
            android:centerY="0.50"
            android:endColor="#ffffffff"
            android:angle="270" />
        </shape>
      </item>
      <item android:id="@android:id/progress">
        <clip>
           <shape>
            <corners android:radius="5dip" />
            <gradient
                 android:startColor="#ff0088eb"
                 android:endColor="#ff0068e7"
                 android:angle="90" />
           </shape>
        </clip>
      </item>
     <item android:id="@android:id/secondaryProgress">
        <clip>
            <inset
                android:insetTop="10dp">
                <shape>
                <corners android:bottomLeftRadius="5dip"
                    android:bottomRightRadius="5dip" />
                <gradient
                     android:startColor="#ff00c8fb"
                     android:endColor="#ff00a8f7"
                     android:angle="90" />
               </shape>
           </inset>
        </clip>
      </item>
    </layer-list>
    

    The main tip is to put the secondary progress drawable after progress drawable in the layer list, so that it is drawn above it, and is always visible, and to use an inset so that it doesn’t take the whole SeekBar height.

    In your example, you could get a result like this :

    SecondaryProgress < Progress
    (====—O    )

    SecondaryProgress == Progress
    (=======O    )

    SecondaryProgress > Progress
    (=======O–    )

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I've got a string that has curly quotes in it. I'd like to replace
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to render a haml file in a javascript response like so:
I want use html5's new tag to play a wav file (currently only supported
I want to show the soap response to UIWebview.. my soap response is, <p><img

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.