-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
RN 0.63.1: ActivityIndicator disapearing #29378
Comments
Is this for iOS, Android, or both? |
@Ashoat sorry I forgot to mentioned in the description. It's happening only on Android. |
having the same problem with RN 0.63.1 |
Confirmed the same behavior on RN 0.63.2 |
1 similar comment
Confirmed the same behavior on RN 0.63.2 |
Even though it is a different component it feels somewhat related to #29412 It seems that in 0.63.x the way tinting is handled is flaky on Android. |
I'm getting this as well (on android), additionally, when I do specify a colour, the component shows, but it is not animating, it just shows a static icon. I'm running 0.63.2, it worked fine when I was running 0.62.x EDIT: Turns out the indicator not animating was somehow my android developer options had defaulted to no animation (0x) |
I have a similar issue and the last version of RN as well. Some of my images are starting to disappear on android. The png files I use do have colors and show up correctly on ios. The image takes up the space it's supposed to but it isn't visible unless I give it an explicit tint color. |
This is also happening on my S20 version 0.63.3 |
Indeed, same issue on Android 0.63.3. Thanks for the workaround with the |
Summary: This is a follow-up to the RN0.63 upgrade. Full context is in [this issue](facebook/react-native#29378). Basically, there is a regression in RN0.63 for Android where if you don't set `color` for an `ActivityIndicator`, it won't display. Test Plan: I tested both callsites in the Android emulator. Before this diff the `ActivityIndicator` was invisible, and after this diff it was visible. For the `MoreScreen` case, since it was theme-dependent I tested for both light and dark themes. Reviewers: palys-swm Reviewed By: palys-swm Subscribers: KatPo, zrebcu411, Adrian Differential Revision: https://phabricator.ashoat.com/D330
Apparently #29830 is the universal PR to fix this but it's been blocked since almost 2 months now. |
adding prop fixed the issue for me |
as explained in #29412 (comment) I believe pr #29830 would fix also #29412 Thanks |
Thank you for your update @fabriziobertoglio1987 |
+1 on this issue: |
…or instead of transparent (#29830) Summary: This pr: - Fixes: #30183 - Fixes: #30056 - Fixes: #29950 - Fixes: #29717 - Fixes: #29495 - Fixes: #29412 - Fixes: #29378 Because most of ReactProps(name = ViewProps.COLOR) accept @ Nullable Integer. For example: https://github.com/facebook/react-native/blob/abb6433f506851430dffb66f0dd34c1e70a223fe/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java#L472-L479 After update to react-native 0.63.2 to make PlatformColor work, there is a new ColorPropSetter. https://github.com/facebook/react-native/blob/abb6433f506851430dffb66f0dd34c1e70a223fe/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagersPropertyCache.java#L194-L215 But ColorPropSetter won't return an nullable value with getValueOrDefault, it will always return it's defaultValue which is 0. And 0 is equal to TRANSPARENT, will cause <Text /> disappear. ## Changelog [Android] [Fixed] - ColorProps with value null should be defaultColor instead of transparent Pull Request resolved: #29830 Test Plan: Please initiated a new project and replaced the app with the following code: ``` import * as React from 'react'; import {Text, View, TouchableOpacity, PlatformColor} from 'react-native'; export default function App() { const [active, setActive] = React.useState(false); return ( <View> <Text style={active ? {color: 'green'} : null}>Example</Text> <Text style={ active ? {color: PlatformColor('android:color/holo_purple')} : null }> Example2 </Text> <TouchableOpacity onPress={() => setActive(!active)}> <Text>Toggle Active</Text> </TouchableOpacity> </View> ); } ``` Thanks you so much for your code review! Reviewed By: JoshuaGross Differential Revision: D30209262 Pulled By: lunaleaps fbshipit-source-id: bc223f84a92f742266cb7b40eb26722551940d76
Description
With the default usage of
<ActivityIndicator />
, the indicators are all disappearing. But when I add the color prop,<ActivityIndicator color="red" />
, I can then see the indicator again.React Native version:
System:
OS: Linux 5.4 Ubuntu 20.04 LTS (Focal Fossa)
CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
Memory: 4.74 GB / 15.59 GB
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node
Yarn: 1.22.4 - /usr/bin/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v12.14.1/bin/npm
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 23, 25, 26, 28
Build Tools: 28.0.3, 29.0.2
System Images: android-24 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: 1.8.0_252 - /usr/bin/javac
Python: 2.7.18 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.1 => 0.63.1
npmGlobalPackages:
react-native: Not Found
Steps To Reproduce
Any usage of
<ActivityIndicator />
inside the source code is not working. Can reproduce with the starter project:npx react-native init RN063
Expected Results
The indicator should be visible with the default color if the
color
props is not specifiedSnack, code example, screenshot, or link to a repository:
N/A
The text was updated successfully, but these errors were encountered: