1

在我的应用程序中,我有一个非常繁忙的布局,我必须添加一些SeekBars。所以我需要减少搜索栏。我height在 Google 和 stackoverflow 中的其他问题中搜索,但我找不到任何解决方案,除了使用android:padding = "0dp",但这还不够。我在我的布局中使用它:

<SeekBar
                android:id="@+id/seekbar"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:padding="0dp"
                android:minHeight="0dip"
                android:maxHeight="2dip" />

您可以看到我使用了maxHeightand minHeight,但似乎受布局管理器的影响。如何检索较小的 SeekBar?

4

1 回答 1

2

您可以使用这两个属性来制作您想要的搜索栏

 android:progressDrawable="@android:color/transparent"
 android:thumb="@drawable/ic_launcher" 

并为这两个属性使用小图像。

于 2013-03-02T08:59:24.877 回答