Skip to content

feat(android): progressbar thickness #717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

lovegaoshi
Copy link

@lovegaoshi lovegaoshi commented Jun 26, 2025

Summary:

addresses #85 for android only.
This PR adds props for android to adjust progress bar thickness, roundness, and thumb size, because android's AppCompatSeekBar is very thin.

The progress bar thickness is done by setting all of AppCompatSeekBar's getProgressDrawable's Layers (where for android 15, 0 is the background; 1 is unknown; 2 is the current progress) height to a given value.

The roundness is done by wrapping all of these layers into a com.facebook.drawee.drawable.RoundedCornersDrawable then applying a radius.

The thumb size is done by using a custom Drawable (ForwardDrawable wrapping the original getThumb() Drawable) to draw a circle with a given size at the original thumb's getRect.

Test Plan:

with prop thickness={100}, it should look like
Image

with prop thickness={100} and roundness={100}, it should look like
Image

with prop thickness={100} and roundness={100} and thumbsize={100}, it should look like
Image

above tests were done with android 14+ devices.
tested iOS builds does NOT break with android only props.

@lovegaoshi lovegaoshi changed the title Feat/progressbar thickness feat(android): progressbar thickness Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant