Skip to content

Commit

Permalink
fixed bug after rotating
Browse files Browse the repository at this point in the history
  • Loading branch information
guiguegon committed Sep 22, 2016
1 parent c10ac2f commit e8143f8
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -152,13 +152,13 @@ protected void setupUi() {
setToolbar(toolbar);
int columns = getMaxColumns();
galleryAdapter = new GalleryAdapter(getContext(), columns);
galleryAdapter.setMultiselection(multiselection);
staggeredGridLayoutManager =
new StaggeredGridLayoutManager(columns, StaggeredGridLayoutManager.VERTICAL);
galleryRecyclerView.setLayoutManager(staggeredGridLayoutManager);
galleryRecyclerView.setAdapter(galleryAdapter);
galleryAdapter.setOnGalleryClickListener(this);
galleryAdapter.setMultiselection(multiselection);
galleryAdapter.setMaxSelectedItems(maxSelectedItems);
galleryAdapter.setOnGalleryClickListener(this);
btnRetry.setOnClickListener(this::onButtonRetryClick);
}

Expand All @@ -167,8 +167,9 @@ protected void init() {
}

protected void afterConfigChange() {
galleryAdapter.setMultiselection(multiselection);
fillGalleryMedia();
galleryAdapter.setMultiselection(multiselection);
galleryAdapter.setMaxSelectedItems(maxSelectedItems);
}

@Override
Expand Down

0 comments on commit e8143f8

Please sign in to comment.