-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
RCTUIManager.measure not working on Android #12966
Comments
Can you show me your view with the ref? I suspect you have the issue I've previously opened in #9382 |
Adding Referring to your comment in #9382, what exactly do you mean by collapsable property?
Although an annoyance, should I just follow your lead and close out this issue? |
So Collapsable property is explained in https://facebook.github.io/react-native/docs/view.html#collapsable
However, some of UIManager functions such as Putting an explicit style is one way to disable the optimization; because now the view has to be created with special drawing properties. But the real fix is putting |
Makes sense. Thank you @hey99xx! |
Having the same issue with Views that are rendered within ListView. For the visible first rows, RCTUIManager.measure receives valid data on Android. But on the invisible rows every value is undefined. I also tried out style={{opacity: 1}} and collapsable={false}. Is doesn't matter if i pass those properties and styles or not. |
@itinance If you post your render method I can help you out. |
Thx @hey99xx , any ideas?
The "container" node in the Stylesheet contains also "opacity:1" |
Is it possible that your list view is getting clipped before you start scrolling down? Maybe on iOS you have rendered the entire list view in the first render, while on Android that's not the case. |
Yes, |
@itinance You should realize that
Although I am glad you are unblocked, I suggest you find a different solution to measure your views after scroll. Maybe onChangeVisibleRows can work. |
Thank you very much for the hint, @hey99xx. I will look at it and try it out. |
Hey @hey99xx , onChangeVisibleRows works really fine and fits all our needs. At least on iOS. On Android this event is never fired unfortunately. There was an open Pullrequest since 14 Januar (!) in the pipeline, that was closed 14 days ago without any merge "as ListView is deprecated" 👎 👎 👎 |
@itinance That's a shame. I was not aware it wouldn't get further bug fixes. You can look at if the new alternative |
Also, unless you have infinite scrolling and/or very long lists with lots of images (basically heavy-weight rendering needs) I wouldn't worry too much about clipping views. |
Just FYI, @hey99xx : the onViewableItemsChanged-Event of VirtualizedList/FlatList works fine unless one use react-native-infinite-scrollview, which is base component of gifted-chat. |
@hey99xx hi, thanks for your answer. |
sorcery!!! |
Description
RCTUIManager.measure
is not working onAndroid
. Tryingthis.refs.myRef.measure()
doesn't give any results either.Reproduction
Additional Information
The text was updated successfully, but these errors were encountered: