Android SeekBar thumb gets clipped/cut off

前端 未结 5 2075
深忆病人
深忆病人 2020-12-08 04:07

When using a custom thumb drawable with a SeekBar view, the thumb drawable is clipped at the left and right edges of the view.

How can I fix this behavi

5条回答
  •  天涯浪人
    2020-12-08 05:00

    You should be able to fix this by setting paddingLeft and paddingRight on your SeekBar to half the thumb width (remember to use density-independent units). You can also control the space allowed at the edges for a seek bar's thumb by calling setThumbOffset.

提交回复
热议问题