This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
[Toolbar] Recommended way to retrieve references to added views? #13705
Labels
needs:triage
Issue needs triage
We add various views to our Toolbar and may want to modify these view's states at a later date, e.g. #267 where we want to update the pinned UI state based on url updates. We currently encapsulate adding our buttons in a single function, e.g.:
However, we have no great way of retrieving a reference to these added views, e.g. how do we access
pinButton
again? Is there a recommended way or should the framework change to support this? One outside-framework approach I came up with is to wrap all of our added views in a separate class but this can create a lot of boilerplate:Maybe the way the Android framework would fix this is:
findViewByTag
and aViewHolder
system?┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: