Fix ProgressBar binding hierarchy#45
Merged
Merged
Conversation
`ProgressBar` extended `JavaObject` rather than `View` and declared no constructors, so it could not be instantiated or used as a view. Inherited methods are marked as overrides accordingly.
This was referenced Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
android.widget.ProgressBarwas bound as extendingJavaObjectrather thanView, and declared no constructors — so it could not be instantiated, and could not be used anywhere aViewis expected. That also affects everything below it in the hierarchy, sinceAbsSeekBarandSeekBarinherit from it.Changes
ProgressBarnow extendsAndroidView.View, with the four standard view constructors and theAndroidContent/AndroidUtil/AndroidViewimports that requires.Vieware markedoverride. Same forAbsSeekBar.onRtlPropertiesChanged, which needs it onceProgressBarsits underView— without it the compiler reportscannot override more than one superclass declaration.The constructor taking a style attribute matters in particular:
ProgressBar's horizontal track is only selectable at construction time viaandroid.R.attr.progressBarStyleHorizontal, so determinate progress is unreachable without it.Verification
swift build --swift-sdk aarch64-unknown-linux-android28completes on this branch.Consumed downstream in AndroidSwiftUI#12, which renders
ProgressViewas a native progress bar and is blocked on this merging.