Extract out common adapter logic to support different AllApps layouts

Test: Manual tests. Refactoring, all existing tests should pass.
Bug: 216150568
Change-Id: I1068e75d0b4a33d402a7d68e237d2484ab3a1e01
9 files changed