0

This is xml

<SeekBar
        android:id="@+id/seek_bar"
        android:layout_width="match_parent"
        android:layout_height="20dp"
        android:background="@null"
        android:max="100"
        android:maxHeight="1dp"
        android:paddingStart="0dp"
        android:paddingEnd="0dp"
        android:progress="0"
        android:progressDrawable="@drawable/seek_bar"
        android:thumbOffset="0dp"/>

For android 5.1, seekbar is invisible but it is really visible for 6,7,8, 9 and 10. When I modified "layout_height" from 20 dp to "wrap_content", version 5.1 can show seekbar. I am so confusing, is there any connection between android version and wrap_content or fixed height value?

In addition, another phone with totally the same screen size can show seekbar if using 20dp.

Thx in advance!

Yyyzzz
  • 1
  • What happen if you change this `android:maxHeight="1dp"` to this `android:maxHeight="20dp"`? Is it visible? – Darkman Feb 05 '21 at 15:30
  • actually maxHeight is the height of the line. so if it is changed to 20dp, part of line can show up, the bottom cannot show up.... It is so hard to describe maybe I need a screenshot – Yyyzzz Feb 07 '21 at 03:15
  • `maybe I need a screenshot`. That's absolutely a good idea. Post your expected `SeekBar` pic would be helpful too. – Darkman Feb 07 '21 at 03:33

0 Answers0