0

It seems the elevation is ignored by seekbar? Any way to get it running? I already changed the background of the embedding view to a solid color, did not help.

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/white">
        <SeekBar
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:elevation="4dp" />
</RelativeLayout>
Daniel Brown
  • 1,060
  • 1
  • 10
  • 23
  • 1- You are testing your code using a Lollipop device, right? 2- Seekbars have a shadow/glow/touch state (or make a custom one)... elevation is not needed. – Mariano Zorrilla Sep 07 '15 at 15:25
  • 1) Yes, on Lollipop. 2) Hmm, I don't see a shadow, only the glow. – Daniel Brown Sep 07 '15 at 15:29
  • It depends on the SDK you're using... Lollipop and Material Design use a Glow for the SeekBar (Holo use it too). I think you should go for a custom SeekBar to achieve a "shadow" look. – Mariano Zorrilla Sep 07 '15 at 15:31
  • Okay, will play around more, thank you. Question is open if anyone knows a "just set xy=true" trick. :) – Daniel Brown Sep 07 '15 at 15:32

1 Answers1

0

After lots of testing I decided to embed the SeekBar in a wrapper View and elevated the wrapper instead of the seekbar. Not as cool, but works.

Daniel Brown
  • 1,060
  • 1
  • 10
  • 23