Android: SeekBar with custom drawable

前端 未结 6 1187
独厮守ぢ
独厮守ぢ 2020-12-31 00:06

I have SeekBar with custom drawable. Progress element is not rendered from left side exactly but it is moved to right. How can I avoid this?



        
6条回答
  •  借酒劲吻你
    2020-12-31 00:28

    Try using a .9.png drawable of width 4dp (converted to px) .

    Keep 1 dp at top and bottom transparent.

    And add colour to the center 2 dp of your choice for the background.

    This way both background and progress will be of same width but the background will look thinner than progress bar.

提交回复
热议问题