B
B
Bogdan2019-04-22 22:38:59
Java
Bogdan, 2019-04-22 22:38:59

SeekBar customization thumb?

Hello. Tell me please. It is necessary to programmatically customize the SeekBar, increased the thumb (slider) and at the minimum and maximum values ​​it does not fit into the viewport (it is actually cut off)

ShapeDrawable thumb = new android.graphics.drawable.ShapeDrawable(
                new android.graphics.drawable.shapes.OvalShape()
        );

        thumb.setColorFilter(android.graphics.Color.RED, android.graphics.PorterDuff.Mode.SRC_OVER );
        thumb.setIntrinsicHeight( 80 );
        thumb.setIntrinsicWidth( 80 );
        thumb.setBounds(0, 0, 80, 80);
        SeekBar seekbar = findViewById(R.id.seekbar);
        seekbar.setThumb(thumb);

5cbe17fbd6ab3261141046.jpeg
Changing the padding didn't help. But I understand that I need to somehow set the padding to progress but I can't google how?
Thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question