Answer the question
In order to leave comments, you need to log in
SeekBar thumb stroke?
Hello. but don't tell me? Did you programmatically customize the SeekBar, increased the thumb, but now there is a kind of stroke around the circle? Do not tell me how to fix it?
ShapeDrawable thumb = new android.graphics.drawable.ShapeDrawable(
new android.graphics.drawable.shapes.OvalShape()
);
thumb.setColorFilter(android.graphics.Color.RED, PorterDuff.Mode.SRC );
thumb.setIntrinsicHeight( 80 );
thumb.setIntrinsicWidth( 80 );
SeekBar seekbar = findViewById(R.id.seekbar);
seekbar.setThumb(thumb);
seekbar.setThumbOffset(0);
seekbar.getProgressDrawable().setColorFilter(new android.graphics.PorterDuffColorFilter(Color.RED, android.graphics.PorterDuff.Mode.SRC_IN));
ShapeDrawable progress = new android.graphics.drawable.ShapeDrawable(
new android.graphics.drawable.shapes.RectShape()
);
seekbar.setProgressDrawable(progress);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question