List of usage examples for android.graphics.drawable Drawable setHotspot
public void setHotspot(float x, float y)
From source file:cnedu.ustcjd.widget.MultiSlider.java
private void setHotspot(float x, float y, Thumb thumb) { if (thumb == null || thumb.getThumb() == null) return;/*from w w w.j a va 2s . c o m*/ final Drawable background = getBackground(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && background != null) { background.setHotspot(x, y); Rect rect = thumb.getThumb().getBounds(); final int offsetY = getPaddingTop(); background.setHotspotBounds(rect.left, rect.top + offsetY, rect.right, rect.bottom + offsetY); } }