working through the "correctness" issues with old code.
Problem:
"Layout Inflation without a Parent" in compilation report. We're building the row template for the MAC addr filter so that we can re-use it as-needed for each displayed filter row, but failing to pass a parent ViewGroup means that when we translate the XML to ViewGroups/etc, we're not using any device-adapted params. Null "works" but it means we're dynamically resizing at runtime which 1. has a performance cost and 2. may result in display bugs.
Solution:addviewview-layoutparams-is-not-supported
contains the discussion, but (at the time of writing), the "pass null" solution" has outscored the "pass the parent but include a third param to indicate not to add the view to it" solution. The latter seems to be correct.
working through the "correctness" issues with old code.
Problem: "Layout Inflation without a Parent" in compilation report. We're building the row template for the MAC addr filter so that we can re-use it as-needed for each displayed filter row, but failing to pass a parent ViewGroup means that when we translate the XML to ViewGroups/etc, we're not using any device-adapted params. Null "works" but it means we're dynamically resizing at runtime which 1. has a performance cost and 2. may result in display bugs.
understanding-androids-layoutinflater-inflate
Solution: addviewview-layoutparams-is-not-supported contains the discussion, but (at the time of writing), the "pass null" solution" has outscored the "pass the parent but include a third param to indicate not to add the view to it" solution. The latter seems to be correct.