Layout="@ layout/layout_sport_strength_indicator"/& gt; Layout="@ layout/layout_sport_strength_indicator"/& gt;
Label layout_sport_strength_indicator. XML is & lt; Merge> , two use viewbinding to include the contents of the assignment, by giving layout_sport_strength_indicator. The corresponding binding XML file binding parent layout method, is to be able to get to the first include the contents of the tag,
If & lt; Include> In the label no & lt; Merge> , you can by giving & lt; Include> Set the id, by id access them respectively, but & lt; Include> Contains & lt; Merge> When, how to distinguish them?
CodePudding user response:
If with the merge of XML is me. The XML, binding is quoted me. The XML page ViewBindmeBinding meBinding=meBinding. Bind (binding. Root)
Get me. XML ViewBind, then can use