вот мой код работает нормально в моем проекте
seekBarWithHint.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
textView.setText("" + progress + " KM");
SmartApplication.REF_SMART_APPLICATION.writeSharedPreferences(Constants.KM, progress);
//Get the thumb bound and get its left value
x = seekBar.getThumb().getBounds().left;
//set the left value to textview x value
textView.setX(x);
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
});
здесь xml код
<SeekBar
android:id="@+id/seekBar_luminosite"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/_22sdp"
android:layout_marginTop="@dimen/_10sdp"
android:layout_marginRight="@dimen/_22sdp"
android:maxWidth="15dp"
android:maxHeight="12dp"
android:minWidth="15dp"
android:minHeight="12dp"
android:progressDrawable="@drawable/custom_seekbar"
android:splitTrack="false"
android:thumb="@drawable/custom_thumb" />