I'm using RowsFragment
with an ObjectAdapter
and I spotted the method ObjectAdapter.setPresenterSelector
. However, I've already set my PresenterSelector
using RowsFragment.setPresenterSelector
, so I'm not sure what ObjectAdapter.setPresenterSelector
does. Does it do anything?
Asked
Active
Viewed 329 times
2

Patricia Li
- 1,346
- 10
- 19
1 Answers
1
Ok, I looked into it and the answer is in the source code of ItemBridgeAdapter
. The method to look up item type contains the following line:
PresenterSelector presenterSelector = mPresenterSelector != null ?
mPresenterSelector : mAdapter.getPresenterSelector();
where mPresenterSelector
is the thing set by RowsFragment.setPresenterSelector
and mAdapter
is the the ObjectAdapter
. So it looks like they first look at what you called RowsFragment.setPresenterSelector
with, and if that's null, they then try to use the ObjectAdapter
's PresenterSelector
.

Patricia Li
- 1,346
- 10
- 19