I managed to get the rows working, but when I click on an item and open up my details activity and go back instead of returning to the row item I just clicked it reloads the complete Browse Fragment again.
Ex.
private final class ItemViewClickedListener implements OnItemViewClickedListener {
@Override
public void onItemClicked(Presenter.ViewHolder itemViewHolder, Object item,
RowPresenter.ViewHolder rowViewHolder, Row row) {
Log.d(TAG, "OnItemViewClickedListener called");
if (item instanceof Item) {
Item mItem = (Item) item;
Log.d(TAG, "Item: " + item.toString());
Intent intent = new Intent(MainActivity.this, DetailsActivity.class);
intent.putExtra(DetailsActivity.ITEM, mItem);
Bundle bundle = ActivityOptionsCompat.makeSceneTransitionAnimation(
MainActivity.this,
((ImageCardView) itemViewHolder.view).getMainImageView(),
DetailsActivity.SHARED_ELEMENT_NAME).toBundle();
MainActivity.this.startActivity(intent, bundle);
}
}
}
I managed to get the rows working, but when I click on an item and open up my details activity and go back instead of returning to the row item I just clicked it reloads the complete Browse Fragment again.
Ex.