【发布时间】:2015-09-07 15:20:34
【问题描述】:
seekbar 似乎忽略了海拔?有什么办法让它运行吗?我已经将嵌入视图的背景更改为纯色,没有帮助。
<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>
【问题讨论】:
-
1- 您正在使用 Lollipop 设备测试您的代码,对吧? 2- Seekbars 具有阴影/发光/触摸状态(或自定义)...不需要高度。
-
1) 是的,在棒棒糖上。 2) 嗯,我没有看到影子,只有光芒。
-
这取决于您使用的 SDK... Lollipop 和 Material Design 为 SeekBar 使用 Glow(Holo 也使用它)。我认为您应该使用自定义 SeekBar 来实现“阴影”外观。
-
好的,会玩更多,谢谢。如果有人知道“刚刚设置 xy=true”的技巧,那么问题是开放的。 :)
标签: android material-design android-seekbar android-elevation