Introduce a view lookup caching FrameLayout
This patch introduces ViewLookupCachingFrameLayout with the intent of making frequent lookups for views much quicker. The new layout adds a method "fastFindViewById" that can be used in place of findViewById. Once the initial lookup has occurred, the view is stored in a map by its ID until it changes location in the hierarchy, removed, or a view with a matching ID is added or removed. This class will help accomplish what was typically done for ViewHolders in RecyclerView. Bug: 982075 Change-Id: I8f4b4f304649b62dcf15c6af748f9fda02b3f8c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1696172Reviewed-by:Ted Choc <tedchoc@chromium.org> Reviewed-by:
Theresa <twellington@chromium.org> Reviewed-by:
Wei-Yin Chen (陳威尹) <wychen@chromium.org> Commit-Queue: Matthew Jones <mdjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#682335}
Showing
Please register or sign in to comment