4

When im pressing the thumb at my Seekbar, a pale shadow appears around it, like shown below.

Before press and click It. How to remove or change pale gray around It.

How can i remove the shadow or set it transparent? Thanks!

Tyrmos
  • 387
  • 4
  • 13
  • 1
    Take a look at [here](http://stackoverflow.com/questions/16163215/android-styling-seek-bar). – Seyyed Nov 30 '16 at 15:57
  • 1
    Tnx! But that Not help me. –  Nov 30 '16 at 16:43
  • 1
    I found the solution at [here](http://stackoverflow.com/questions/30452875/how-can-i-remove-the-glow-from-a-pressed-slider-in-android?answertab=votes#tab-top). – Reven Apr 26 '17 at 10:43

4 Answers4

6

add

android:background="@null"

for example:

<androidx.appcompat.widget.AppCompatSeekBar
    android:id="@+id/seekbar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@null" />
Vinc
  • 83
  • 1
  • 7
2

It's a bit unintuitive, but just set android:background="@android:color/transparent" on the SeekBar.

Parth Bhayani
  • 1,894
  • 3
  • 17
  • 35
Matt Robertson
  • 2,928
  • 5
  • 34
  • 62
0

I guess if you change the ripple color, you can change that color. See this link to more information about how to change the ripple color of a button, the same solution maybe useful to you.

Ângelo Polotto
  • 8,463
  • 2
  • 36
  • 37
0

it's controlled by colorControlHighlight

so


<androidx.appcompat.widget.AppCompatSeekBar
            android:id="@+id/seekbar"
            android:layout_width="0dp"
            android:layout_height="35dp"
            android:layout_weight="1"
            android:theme="@style/seekBarStyle"
            />

    <style name="seekBarStyle">
        <item name="colorAccent">#0394D6</item>
        <item name="colorControlHighlight">#22ffffff</item>
        <item name="android:textColorSecondary">#fff</item>
    </style>

OK the 'highlight' is just a ripple background of the seekbar, which is quite interesting!

KnIfER
  • 712
  • 7
  • 13