Skip to content

android: Convert progress indicator to Compose UI - #46353

Merged
yezhizhen merged 1 commit into
servo:mainfrom
veyndan:compose-ui-progress-indicator
Jul 9, 2026
Merged

android: Convert progress indicator to Compose UI#46353
yezhizhen merged 1 commit into
servo:mainfrom
veyndan:compose-ui-progress-indicator

Conversation

@veyndan

@veyndan veyndan commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Testing: There are no automated tests for Android.
Fixes: Part of #45715.

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 7, 2026
style="@android:style/Widget.Material.EditText"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_height="wrap_content"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required, otherwise the field is clipped vertically when the progress indicator is visible. It's a bit counterintuitive. It's been so long since I've dealt extensively with Android Views, so I'm not really sure why this works, just that it does.

@yezhizhen yezhizhen Jul 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this no longer matters anyway after full migration in the future.
Might be some weird interaction with legacy layout.

Signed-off-by: veyndan <veyndan@gmail.com>
@veyndan
veyndan force-pushed the compose-ui-progress-indicator branch from 480c56f to f1fb604 Compare July 7, 2026 19:22
if (isRefreshingState.value) {
CircularProgressIndicator(
modifier = Modifier
.padding(end = 10.dp)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. There's no concept of margin but only padding in Compose.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it depends on which order around the padding and size is. If the function calls were flipped, then it acts like padding.

style="@android:style/Widget.Material.EditText"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_height="wrap_content"

@yezhizhen yezhizhen Jul 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this no longer matters anyway after full migration in the future.
Might be some weird interaction with legacy layout.

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jul 8, 2026
@yezhizhen
yezhizhen added this pull request to the merge queue Jul 9, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 9, 2026
Merged via the queue into servo:main with commit 74d89fa Jul 9, 2026
31 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 9, 2026
@veyndan
veyndan deleted the compose-ui-progress-indicator branch July 9, 2026 15:05
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.

3 participants