fix layout with attribute id setted in include

This commit is contained in:
houzh 2023-09-21 16:42:07 +08:00
parent 2175400906
commit eddef5062d

View File

@ -124,6 +124,7 @@ static void startElement(void *userData, const XML_Char *name, const XML_Char **
View* includedView = LayoutInflater::from(pd->ctx)->inflate(layout,parent,true,&atts);
if(includedView) { //for merge as rootnode,the includedView will be null.
LayoutParams*lp = parent->generateLayoutParams(atts);
includedView->setId(pd->ctx->getId(atts.getString("id")));
includedView->setLayoutParams(lp);
}
return;