在Android 5.0 API 21 Lollipop中,Seek Bar拇指不透明 [英] Seek Bar thumb not transparent in Android 5.0 API 21 Lollipop

查看:70
本文介绍了在Android 5.0 API 21 Lollipop中,Seek Bar拇指不透明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

API级别< 21

API Level < 21

按预期,缩略图是透明的.

Thumb is transparent, as expected.

在API级别21

拇指不透明,想知道为什么.

Thumb is opaque, Wonder why.

这是代码

 <SeekBar
                android:id="@+id/ui_audioplayer_progressbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:progressDrawable="@drawable/custom_progress_bar_horizontal"
                android:thumb="@drawable/stud_slider" />

有趣的是,当您更改API级别透视图时,可以在eclipse本身的xml预览中看到并重现此问题.

Interestingly, this problem can be seen and reproduced in the xml preview in eclipse itself, when you change the API Level perspectives.

注意:

  • 我在两个设备上都运行相同的APK.
  • 这两种设备的品牌和型号都相同,即Nexus 5.
  • 从API级别<的屏幕快照可以明显看出,拇指图像是具有透明背景的PNG. 21

这是棒棒糖中的已知错误,还是我做错了什么?

Is this a known bug in Lollipop or am i doing something wrong?

推荐答案

<SeekBar
    ....
    android:splitTrack="false" 
/>

这篇关于在Android 5.0 API 21 Lollipop中,Seek Bar拇指不透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆