HomePhabricator

Use ViewFactory for building statementviews in statementlistview

Authored by adrianheine.

Description

Use ViewFactory for building statementviews in statementlistview

This change introduces a ViewFactory method for building ListItemAdapters
for statementview widgets. This ListItemAdapter is passed to the
statementlistview so that it can create the widgets without having to
pass them all their dependencies.

This change leaves listview as an implementation detail of
statementlistview. This implementation detail is publicly represented by
having to pass in a listview.ListItemAdapter.

It improves separation between the statementlistview and statementview,
since the statementlistview doesn't have to know how to construct a
statementview anymore. It also allows to inject a different implementation,
for example in tests.

This is a fourth step for T75380.

Bug: T75380
Change-Id: I293e6f745fc96f1dab9951e21af613ede8471501