Seekbar now showing up on Android 5.1, but can show up normally on 6、7、8、9、10

54 Views Asked by At

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!

0

There are 0 best solutions below