[android] Fixed random crash while clearing the sponosred adapter

This commit is contained in:
Александр Зацепин 2017-08-02 11:38:16 +03:00 committed by Arsentiy Milchakov
parent d967f945de
commit d6f0a0f885

View file

@ -1010,7 +1010,7 @@ public class PlacePageView extends RelativeLayout
private void clearSponsoredGalleryViews()
{
mSponsoredAdapter = null;
mRvSponsoredProducts.setAdapter(new ViatorAdapter(new ViatorProduct[]{}, "", null));
mRvSponsoredProducts.swapAdapter(null /* adapter */, false /* removeAndRecycleExistingViews */);
}
@Override