Made the transitions between different grid sizes work. Of course only as long as the item layout doesn't change (i.e. list to grid)
This commit is contained in:
parent
d1b06b79f8
commit
ce07648ff6
3 changed files with 3 additions and 3 deletions
|
|
@ -48,7 +48,7 @@ public class AlbumsFragment extends AbsMainActivityRecyclerViewCustomGridSizeFra
|
|||
@Override
|
||||
protected void setGridSize(int gridSize) {
|
||||
getLayoutManager().setSpanCount(gridSize);
|
||||
getLayoutManager().requestLayout();
|
||||
getAdapter().notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -80,6 +80,6 @@ public class ArtistsFragment extends AbsMainActivityRecyclerViewCustomGridSizeFr
|
|||
@Override
|
||||
protected void setGridSize(int gridSize) {
|
||||
getLayoutManager().setSpanCount(gridSize);
|
||||
getLayoutManager().requestLayout();
|
||||
getAdapter().notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,6 @@ public class SongsFragment extends AbsMainActivityRecyclerViewCustomGridSizeFrag
|
|||
@Override
|
||||
protected void setGridSize(int gridSize) {
|
||||
getLayoutManager().setSpanCount(gridSize);
|
||||
getLayoutManager().requestLayout();
|
||||
getAdapter().notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue