Skip to content

Commit 999b4c9

Browse files
committed
fix(android): Use the morphing MD3 loading indicator
1 parent 800d622 commit 999b4c9

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

‎apps/mobile/src/components/AppActivityIndicator.android.tsx‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CircularProgressIndicator, Host } from "@expo/ui/jetpack-compose";
1+
import { LoadingIndicator, Host } from "@expo/ui/jetpack-compose";
22
import { size as composeSize } from "@expo/ui/jetpack-compose/modifiers";
33
import { StyleSheet, View, type ActivityIndicatorProps } from "react-native";
44
import { useResolveClassNames, withUniwind } from "uniwind";
@@ -14,7 +14,7 @@ function AndroidActivityIndicator({
1414
...viewProps
1515
}: ActivityIndicatorProps) {
1616
const { color: primaryColor } = useResolveClassNames("text-primary");
17-
const diameter = typeof size === "number" ? size : size === "large" ? 36 : 20;
17+
const diameter = typeof size === "number" ? size : size === "large" ? 48 : 20;
1818

1919
return (
2020
<View
@@ -31,10 +31,9 @@ function AndroidActivityIndicator({
3131
>
3232
{animating ? (
3333
<Host ignoreSafeAreaKeyboardInsets style={{ flex: 1 }}>
34-
<CircularProgressIndicator
34+
<LoadingIndicator
3535
color={color ?? primaryColor}
3636
modifiers={[composeSize(diameter, diameter)]}
37-
strokeWidth={diameter / 10}
3837
/>
3938
</Host>
4039
) : null}

‎apps/mobile/src/components/MaterialButton.android.tsx‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
Box,
33
Button,
4-
CircularProgressIndicator,
4+
LoadingIndicator,
55
FilledTonalButton,
66
Host,
77
Row,
@@ -78,9 +78,8 @@ export function MaterialButton(props: MaterialButtonProps) {
7878
<Row verticalAlignment="center">
7979
{props.loading ? (
8080
<>
81-
<CircularProgressIndicator
81+
<LoadingIndicator
8282
modifiers={[size(mediumIconSize, mediumIconSize)]}
83-
strokeWidth={2}
8483
color={colors["--color-foreground-muted"]}
8584
/>
8685
<Box modifiers={[size(8 * scale, 1)]} />

0 commit comments

Comments
 (0)