Skip to content

[Android] measure not returning values unless element has onLayout property #3282

Closed
@oblador

Description

@oblador

I have something similar to this:

handleSomething: function() {
  this._root.measure((ox, oy, width, height, px, py) => {
    console.log({ox, oy, width, height, px, py});
  });
},
render: function() {
  return (<View ref={component => this._root = component}>...</View>);
}

This code works flawlessly on iOS, but on android the measure callback will always be called with undefined arguments – unless I put an empty callback on the onLayout property.

Metadata

Metadata

Assignees

Labels

Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions