You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pay attention 🛎️ !!
There has been no activity on this issue for 2 months, so I will label it stalled.
It will be automatically closed in 60 days if no more activity. Feel free to leave a comment if you have any questions.
Sorry, closing this issue because it has stalled for over 3 months.
Feel free to reopen if this issue is still relevant, or to ping the collaborator if you have any questions.
Describe the bug
升级 3.0 后,自定义控件高度一直为 0,在 createRenderNode 的时候打印前端传过来的 Props 里面高度是有的,Debug 发现在NativeRenderProvider中的以下方法中,解析出来的 list 高度直接为 0,导致后面步骤获取出来的值也是 0:
@CalledByNative
public void callUIFunction(int rootId, int nodeId, long callbackId, String functionName, byte[] buffer) {
NativeRenderDelegate renderDelegate = (NativeRenderDelegate)this.mRenderDelegateRef.get();
if (renderDelegate != null) {
try {
List list = this.bytesToArgument(ByteBuffer.wrap(buffer));
renderDelegate.callUIFunction(rootId, nodeId, callbackId, functionName, list);
} catch (NativeRenderException var9) {
renderDelegate.handleRenderException(var9);
}
}
To Reproduce
Steps to reproduce the behavior:
自定义一个控件,继承 CardView 或者别的 VIew;
在自定义控件中使用和官方 Pager 同样实现计算和布局:
private val measureAndLayout = Runnable {
if (readyToLayout()) {
measure(
MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)
)
LogUtil.d("hippy:::measureAndLayout:::$width:::$height:::$left:::$top:::$right:::$bottom")
layout(left, top, right, bottom)
}
}
override fun requestLayout() {
super.requestLayout()
triggerRequestLayout()
}
fun bindData(data: List? = null) {
setdata(data)
triggerRequestLayout()
}
最终控件宽度正常,为vue 前端设置的值,高度为 0;
Go to '...'
Click on '....'
Scroll down to '....'
See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: