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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:20:32+00:00 2026-05-28T17:20:32+00:00

Hi I try to customize a seekbar. Here’s my Problem: main.xml … <SeekBar android:id=@+id/seekBar1

  • 0

Hi I try to customize a seekbar.

Here’s my Problem:

main.xml

   ...
    <SeekBar android:id="@+id/seekBar1" 
                android:layout_width="match_parent" 
                android:layout_height="wrap_content" 
                android:layout_alignParentLeft="true"
                android:thumb="@drawable/seekbarthumb"
                android:progressDrawable="@drawable/sb2"
                android:minHeight="45dip"
                android:maxHeight="45dip"
            ></SeekBar>
    ...

sb2.xml in @drawable

<layer-list  xmlns:android="http://schemas.android.com/apk/res/android">   
<item android:id="@android:id/background" 
    android:drawable="@drawable/seekbarbg">
</item>
<item android:id="@android:id/progress"
    android:drawable="@drawable/sb_progress">
</item>
</layer-list>

Everything works fine, but the sb_progress was on the wrong position.

So i have 2 solutions. Change the position of the sb_progress or edit sb_progress with Photoshop and add transparent pixels to fix it.

By trying the good way of changing the position something went wrong:

i added some lines to the sb2.xml

<layer-list  xmlns:android="http://schemas.android.com/apk/res/android">   
<item android:id="@android:id/background" 
    android:drawable="@drawable/seekbarbg">
</item>
<item android:id="@android:id/progress" >
    <inset
    android:drawable="@drawable/sb_progress" 
    android:insetTop="11dip"
    android:insetBottom="11dip"
    android:insetLeft="11dip">
    </inset>
</item>
</layer-list>  

I added the inset element, but the result suxx. the position is correct but the progress isn’t animating anymore. The sb_progress.png is always full drawn and don’t stop at the thumb.

I need help! Is this a Bug and I need to add transparent Pixels? Isn’t

InsetDrawable a subclass of Drawable. Why the seekbar doesn’t work anymore with an InsetDrawable.

java.lang.Object
↳ android.graphics.drawable.Drawable
↳ android.graphics.drawable.InsetDrawable

  • 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-05-28T17:20:33+00:00Added an answer on May 28, 2026 at 5:20 pm

    I know this is an old question, but if anyone finds this through a search engine (like I did) all you need to do is add a ‘clip’ to the drawable as well as an inset.

    <item android:id="@android:id/progress" >
        <clip>
        <inset
            android:insetRight="11dp"
            android:insetLeft="11dp">
            <shape>
                 <solid android:color="#343434"/>
            </shape>
        </inset>
        </clip>
    </item>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I'm having pretty much exactly the problem described here: http://code.google.com/p/android/issues/detail?id=6191 and until the
my problem is that I try to customize the formatastic view. But before I
I try to customize a spark datagrid with css file. I have a problem
I try to rewrite and customize @Html.ActionLink , in one of overloads of this
i try to customize a uitabbar i extended uitabbar item and now have a
i try to customize the rule of the JQuery validation plugin and I'm almost
I'm semi new to developing for iOS. And when i try to customize a
I am using Cakephp and try to customize the paginator result with some checkboxes
I create a few UIBarButtonItem with interface builder and try to customize the button
I have a very poor understanding of exception handling(i.e., how to customize throw, try,

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.