Skip to content

Commit e76e589

Browse files
runningdeveloperTrancever
authored andcommitted
fix: fix activityindictor crash on android (#1935)
1 parent 856e84c commit e76e589

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/components/ActivityIndicator.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ class ActivityIndicator extends React.Component<Props, State> {
183183

184184
return (
185185
<View style={[styles.container, style]} {...rest}>
186-
<Animated.View style={[{ width: size, height: size, opacity: fade }]}>
186+
<Animated.View
187+
style={[{ width: size, height: size, opacity: fade }]}
188+
collapsable={false}
189+
>
187190
{[0, 1].map(index => {
188191
// Thanks to https://github.com/n4kz/react-native-indicators for the great work
189192
const inputRange = Array.from(

src/components/__tests__/__snapshots__/ActivityIndicator.test.js.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ exports[`renders colored indicator 1`] = `
1313
}
1414
>
1515
<View
16+
collapsable={false}
1617
style={
1718
Object {
1819
"height": 24,
@@ -195,6 +196,7 @@ exports[`renders hidden indicator 1`] = `
195196
}
196197
>
197198
<View
199+
collapsable={false}
198200
style={
199201
Object {
200202
"height": 24,
@@ -377,6 +379,7 @@ exports[`renders indicator 1`] = `
377379
}
378380
>
379381
<View
382+
collapsable={false}
380383
style={
381384
Object {
382385
"height": 24,
@@ -559,6 +562,7 @@ exports[`renders large indicator 1`] = `
559562
}
560563
>
561564
<View
565+
collapsable={false}
562566
style={
563567
Object {
564568
"height": 48,

src/components/__tests__/__snapshots__/Button.test.js.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ exports[`renders loading button 1`] = `
600600
}
601601
>
602602
<View
603+
collapsable={false}
603604
style={
604605
Object {
605606
"height": 16,

0 commit comments

Comments
 (0)